|
Sound Byte Libs 29c5ff3
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
#include <one_pole.hpp>
Public Member Functions | |
| void | set_coefficient (float a) |
| Set filter coefficient directly. | |
| void | set_frequency (float freq_hz, uint32_t sr=48000) |
| Compute coefficient from cutoff frequency (cold path) | |
| 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. | |
Definition at line 21 of file one_pole.hpp.
|
inline |
Current coefficient.
Definition at line 79 of file one_pole.hpp.
|
inline |
Process a block of samples in-place.
| buf | Audio buffer (modified in-place) |
| frames | Number of samples |
Definition at line 69 of file one_pole.hpp.
References process().
|
inline |
Process a single sample.
| x | Input sample |
Definition at line 58 of file one_pole.hpp.
Referenced by process(), sbl::widgets::proc::Delay::process(), and sbl::widgets::proc::PlateReverb::process().
|
inline |
Reset filter state to zero.
Definition at line 82 of file one_pole.hpp.
Referenced by sbl::widgets::proc::Delay::reset(), and sbl::widgets::proc::PlateReverb::reset().
|
inline |
Reset filter state to a specific value.
Definition at line 85 of file one_pole.hpp.
|
inline |
Set filter coefficient directly.
a = 0.0 → no filtering (hold previous output), 1.0 → full passthrough. For audio-rate smoothing: ~0.03-0.12. For parameter smoothing: ~0.002-0.008.
Definition at line 31 of file one_pole.hpp.
Referenced by sbl::widgets::proc::PlateReverb::set_damping(), and sbl::widgets::proc::Delay::set_tone().
|
inline |
Compute coefficient from cutoff frequency (cold path)
Uses approximation of 1 - exp(-2pi * fc / sr).
| freq_hz | Cutoff frequency in Hz |
| sr | Sample rate |
Definition at line 41 of file one_pole.hpp.
Referenced by sbl::widgets::proc::PlateReverb::set_sample_rate().
|
inline |
Current filter state (last output)
Definition at line 76 of file one_pole.hpp.