|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
#include <fader.hpp>
Public Member Functions | |
| void | set_level_su (float su) |
| void | set_taper (Taper t) |
| void | process (float *buf, uint16_t n) |
| void | process (float *buf_l, float *buf_r, uint16_t n) |
| float | tick (uint16_t n) |
| float | gain () const |
| Current smoothed gain value (after taper mapping + smoothing). | |
| float | level () const |
| Raw su level (before taper mapping). | |
| void | reset () |
| Reset smoother state and level to defaults. | |
Static Public Attributes | |
| static constexpr float | kSettlingMs = 15.0f |
|
inline |
Port: set the fader level [0, 1]. Clamped, taper-mapped, and fed into internal smoother.
Definition at line 46 of file fader.hpp.
Referenced by sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::add_send(), sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::set_gain_su(), sbl::dsp::modules::Mixer< MaxFrames, NumAudio, NumReturn, MaxSends >::set_master_fader_su(), and sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::set_send_level_su().
|
inline |
Parameter: set the taper curve (structural config). Recomputes target gain from current level.
Definition at line 55 of file fader.hpp.
Referenced by sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::add_send(), sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::set_fader_taper(), and sbl::dsp::modules::Mixer< MaxFrames, NumAudio, NumReturn, MaxSends >::set_master_taper().
|
inline |
Apply gain to a mono buffer in-place. Per-sample smoothing toward target gain — click-free.
Definition at line 62 of file fader.hpp.
References sbl::dsp::primitives::ParameterSmoother::process().
|
inline |
Apply gain to stereo buffers in-place. Same smoothed gain applied to both channels per sample.
Definition at line 72 of file fader.hpp.
References sbl::dsp::primitives::ParameterSmoother::process().
|
inline |
Advance the smoother by n samples' worth without processing audio. Call once per block with the block size for control-rate gain updates (e.g., send levels) — settling time matches per-sample process() regardless of call rate. Returns the current smoothed gain.
Definition at line 86 of file fader.hpp.
References sbl::dsp::primitives::ParameterSmoother::process_steps().
Referenced by sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::process().
|
inline |
Current smoothed gain value (after taper mapping + smoothing).
Definition at line 92 of file fader.hpp.
References sbl::dsp::primitives::ParameterSmoother::value().
Referenced by sbl::dsp::widgets::Channel< MaxFrames, MaxSends >::fader_gain().
|
inline |
|
inline |
Reset smoother state and level to defaults.
Definition at line 98 of file fader.hpp.
References sbl::dsp::comp::Audio, and sbl::dsp::primitives::ParameterSmoother::reset().
|
staticconstexpr |