|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Polynomial BLEP kernels, and the sub-frame time of a crossing. More...
Polynomial BLEP kernels, and the sub-frame time of a crossing.
A BLEP kernel band-limits a discontinuity at a known time between frames. The kernel is the smoothing function the naive waveform is convolved with before sampling. Its integral is the band-limited step, and where that differs from the naive step on the frames the kernel touches is the step residual; the slope residual is the same for a corner, from the kernel's second integral. Corrected output is the naive waveform convolved with the kernel, and residuals from events closer than a kernel's span add linearly. A non-negative kernel with unit area, as Bspline4 and Linear2 are, never takes the output outside the naive range. Sinc16 rings: its step overshoots by 8.2 % of the step's height on either side, so a pulse between -1 and 1 reaches 1.16.
A kernel is a policy type for BlepCorrector<Kernel>:
t is the fraction of a frame elapsed since the event, read at the first frame after it, in [0, 1). at[i] corrects frame i - LATENCY relative to that frame; a caller adds height * at[i] for a step of height and delta * at[i] for a slope change of delta per frame, so its output trails the naive waveform by LATENCY frames.
Definition in file polyblep.hpp.
Go to the source code of this file.
Classes | |
| struct | sbl::dsp::math::BlepResidual< N > |
| A kernel's corrections for the N frames it touches, oldest first. More... | |
| struct | sbl::dsp::math::Bspline4 |
| The cubic B-spline over four frames, two before the event and two after. More... | |
| struct | sbl::dsp::math::Linear2 |
| The triangular kernel over two frames, one before the event and one after: Plaits' polyBLEP. More... | |
| struct | sbl::dsp::math::Sinc16 |
| A Kaiser-windowed sinc over sixteen frames, eight before the event and eight after. More... | |
Namespaces | |
| namespace | sbl |
| Root namespace for all Sound Byte Libs code. | |
| namespace | sbl::dsp |
| The audio stack. | |
| namespace | sbl::dsp::math |
| Math for the audio stack. | |
Functions | |
| constexpr float | sbl::dsp::math::polyblep_time (float before, float after, float threshold_before, float threshold_after) |
| Sub-frame time at which a linear segment crossed a moving threshold. | |
| constexpr float | sbl::dsp::math::polyblep_time (float before, float after, float threshold) |
| Sub-frame time at which a linear segment crossed a fixed threshold. | |
Variables | |
| constexpr float | sbl::dsp::math::POLYBLEP_T_MAX = 0.99999994f |
| The largest float below 1, the upper bound of a sub-frame time. | |