|
Sound Byte Libs 0.5.1-340-gab5b79a
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
A frame-rate signal interpolated at FACTOR steps through each frame, LATENCY frames late. More...
A frame-rate signal interpolated at FACTOR steps through each frame, LATENCY frames late.
Each frame takes one sample and gives FACTOR values: the signal at the ends of the FACTOR equal parts of the frame LATENCY frames back. A sinc under a Kaiser window of beta 8 over TAPS samples interpolates between samples; the last value is the sample LATENCY frames back itself. Each set of taps sums to 1, so a constant passes. On a sine at 48 kHz the error of the values is under -75 dB of the sine's amplitude up to 15 kHz, -42 dB at 17.6 kHz and -18 dB at 20 kHz. PmPulse follows its PM signal within a frame with it.
Below the signal transport: a sample in, values out, no units. The taps are generated by scripts/generate_sinc_upsampler.py into sinc_upsampler_coefficients.hpp. Output does not depend on block size: it runs a frame at a time.
Definition at line 31 of file sinc_upsampler.hpp.
#include <sinc_upsampler.hpp>
Public Member Functions | |
| void | process (float sample, float(&out)[FACTOR]) |
| One frame: push a sample and interpolate the frame LATENCY frames back. | |
| void | reset () |
| History to zero. | |
Static Public Attributes | |
| static constexpr uint8_t | FACTOR = sinc_upsampler::FACTOR |
| static constexpr uint8_t | TAPS = sinc_upsampler::TAPS |
| static constexpr uint8_t | LATENCY = TAPS / 2 - 1 |
|
inline |
One frame: push a sample and interpolate the frame LATENCY frames back.
| sample | This frame's sample | |
| [out] | out | out[k] is the signal (k + 1) / FACTOR through the frame LATENCY frames back |
Definition at line 44 of file sinc_upsampler.hpp.
References FACTOR, LATENCY, and TAPS.
Referenced by sbl::dsp::PmInput::process(), and sbl::dsp::PmInput::process().
|
inline |
History to zero.
Definition at line 67 of file sinc_upsampler.hpp.
Referenced by sbl::dsp::PmInput::reset().
|
staticconstexpr |
|
staticconstexpr |
samples each value is interpolated from
Definition at line 34 of file sinc_upsampler.hpp.
Referenced by process().
|
staticconstexpr |
frames between a sample and its value
Definition at line 35 of file sinc_upsampler.hpp.
Referenced by process().