|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
Definition at line 31 of file critical_damp.hpp.
#include <critical_damp.hpp>
Public Member Functions | |
| void | set_time_ms (float ms, float rate_hz) |
| Set settling time in milliseconds. | |
| void | set_coefficient (float a) |
| Set coefficient directly (advanced use) | |
| float | process (float target) |
| Process one sample toward target. | |
| void | process (float *buf, uint16_t frames, float target) |
| Fill buffer with smoothed trajectory toward target. | |
| float | value () const |
| Current output value. | |
| float | coefficient () const |
| Current per-pole coefficient. | |
| void | reset () |
| Reset to zero. | |
| void | reset (float val) |
| Reset to specific value (both stages) | |
|
inline |
Set settling time in milliseconds.
| ms | Time for 95% settling (0 = instant) |
| rate_hz | Update rate in Hz (e.g., 1000 for block-rate, 48000 for audio-rate) |
Computes the per-pole coefficient for a two-stage cascade. The combined system reaches 95% of a step change in ms milliseconds.
Definition at line 43 of file critical_damp.hpp.
References sbl::dsp::math::one_minus_exp_neg().
|
inline |
Set coefficient directly (advanced use)
| a | Per-pole coefficient [0, 1] |
Definition at line 63 of file critical_damp.hpp.
|
inline |
Process one sample toward target.
| target | The value to approach |
Definition at line 70 of file critical_damp.hpp.
Referenced by sbl::dsp::modules::Ladder::process(), sbl::dsp::widgets::Svf::process(), and process().
|
inline |
Fill buffer with smoothed trajectory toward target.
| buf | Output buffer (filled with per-sample smoothed values) |
| frames | Number of samples |
| target | Target value |
Useful for generating per-sample coefficient ramps inside filter widgets.
Definition at line 84 of file critical_damp.hpp.
References process().
|
inline |
Current output value.
Definition at line 91 of file critical_damp.hpp.
|
inline |
Current per-pole coefficient.
Definition at line 94 of file critical_damp.hpp.
|
inline |
Reset to zero.
Definition at line 97 of file critical_damp.hpp.
Referenced by sbl::dsp::modules::Ladder::set_cutoff_su(), sbl::dsp::widgets::Svf::set_cutoff_su(), sbl::dsp::modules::Ladder::set_resonance_su(), and sbl::dsp::widgets::Svf::set_resonance_su().
|
inline |
Reset to specific value (both stages)
Definition at line 103 of file critical_damp.hpp.