|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Definition at line 38 of file one_pole.hpp.
#include <one_pole.hpp>
Public Member Functions | |
| void | set_range (float min_hz, float max_hz) |
| Set frequency range for _su mapping (configuration, not a signal) | |
| void | set_cutoff_su (float su) |
| Set cutoff frequency via signal unit. | |
| void | set_coefficient (float a) |
| Set filter coefficient directly. | |
| float | process (float x) |
| Process a single sample. | |
| void | process (float *buf, uint16_t frames) |
| Process a block of samples in-place. | |
| float | value () const |
| Current filter state (last output) | |
| float | coefficient () const |
| Current coefficient. | |
| void | reset () |
| Reset filter state to zero. | |
| void | reset (float initial) |
| Reset filter state to a specific value. | |
Friends | |
| struct | OnePoleTestAccess |
|
inline |
Set frequency range for _su mapping (configuration, not a signal)
Defines the Hz range that [0, 1] maps to exponentially. Default range is 20–20000 Hz.
| min_hz | Frequency at su = 0.0 |
| max_hz | Frequency at su = 1.0 |
Definition at line 51 of file one_pole.hpp.
Referenced by sbl::dsp::pm::StringLoop::init(), and sbl::dsp::primitives::OnePoleHP::set_range().
|
inline |
Set cutoff frequency via signal unit.
Maps [0, 1] exponentially across the configured frequency range. su = 0.0 → min_hz, su = 1.0 → max_hz.
| su | Unipolar signal [0, 1] |
Definition at line 64 of file one_pole.hpp.
References sbl::dsp::math::clamp01(), and sbl::dsp::math::su_to_hz().
Referenced by sbl::dsp::pm::StringLoop::init(), sbl::dsp::modules::AlgoReverb< ScalePercent >::process(), sbl::dsp::modules::TapeDelay::process(), sbl::dsp::primitives::OnePoleHP::set_cutoff_su(), and sbl::dsp::pm::StringLoop::set_damping_su().
|
inline |
Set filter coefficient directly.
a = 0.0 → no filtering (hold previous output), 1.0 → full passthrough.
Definition at line 73 of file one_pole.hpp.
Referenced by sbl::dsp::modules::AlgoReverb< ScalePercent >::process(), and sbl::dsp::primitives::OnePoleHP::set_coefficient().
|
inline |
Process a single sample.
| x | Input sample |
Definition at line 80 of file one_pole.hpp.
Referenced by process(), sbl::dsp::modules::AlgoReverb< ScalePercent >::process(), sbl::dsp::modules::TapeDelay::process(), sbl::dsp::primitives::OnePoleHP::process(), and sbl::dsp::pm::StringLoop::tick().
|
inline |
Process a block of samples in-place.
| buf | Audio buffer (modified in-place) |
| frames | Number of samples |
Definition at line 90 of file one_pole.hpp.
References process().
|
inline |
Current filter state (last output)
Definition at line 97 of file one_pole.hpp.
|
inline |
Current coefficient.
Definition at line 100 of file one_pole.hpp.
Referenced by sbl::dsp::primitives::OnePoleHP::coefficient().
|
inline |
Reset filter state to zero.
Definition at line 103 of file one_pole.hpp.
Referenced by sbl::dsp::modules::AlgoReverb< ScalePercent >::reset(), sbl::dsp::modules::TapeDelay::reset(), sbl::dsp::pm::StringLoop::reset(), sbl::dsp::primitives::OnePoleHP::reset(), and sbl::dsp::primitives::OnePoleHP::reset().
|
inline |
Reset filter state to a specific value.
Definition at line 106 of file one_pole.hpp.
|
friend |
Definition at line 109 of file one_pole.hpp.