|
Sound Byte Libs 0.5.1-121-g3358a44
C++ firmware library for audio applications on 32-bit ARM Cortex-M processors
|
#include <lfo.hpp>
Public Member Functions | |
| void | set_wavetable (const float *table) |
| Set wavetable (must have guard points for interpolation) | |
| void | set_increment (uint32_t inc) |
| Set phase increment directly. | |
| void | set_rate_su (float su) |
| Set LFO rate from normalized [0,1] signal unit. | |
| void | set_depth_su (float su) |
| Set output amplitude from normalized [0,1] signal unit. | |
| void | process (float *out, uint16_t frames) |
| Generate modulation signal (bipolar: -depth to +depth) | |
| void | sync () |
| Hard sync — reset phase to zero. | |
| float | value () const |
| Current LFO value (bipolar, float) | |
| uint32_t | phase () const |
| Current phase. | |
| uint32_t | increment () const |
| Current phase increment. | |
Friends | |
| struct | LfoTestAccess |
|
inline |
Set wavetable (must have guard points for interpolation)
Definition at line 46 of file lfo.hpp.
References sbl::dsp::primitives::WavetableReader< Size >::set_table().
|
inline |
Set phase increment directly.
Definition at line 49 of file lfo.hpp.
References sbl::dsp::primitives::PhaseAccumulator::set_increment().
|
inline |
Set LFO rate from normalized [0,1] signal unit.
| su | Unipolar [0,1] — exponential map to 0.05–30 Hz |
Exponential mapping gives fine resolution at low rates (slow sweeps) and coarser control at high rates (fast vibrato/tremolo).
Definition at line 60 of file lfo.hpp.
References sbl::dsp::math::fast_exp2f().
|
inline |
|
inline |
Generate modulation signal (bipolar: -depth to +depth)
| out | Output buffer (float) |
| frames | Number of samples |
Definition at line 84 of file lfo.hpp.
References sbl::dsp::primitives::PhaseAccumulator::advance(), sbl::dsp::primitives::PhaseAccumulator::phase(), and sbl::dsp::primitives::WavetableReader< Size >::read().
|
inline |
Hard sync — reset phase to zero.
Definition at line 92 of file lfo.hpp.
References sbl::dsp::primitives::PhaseAccumulator::reset().
|
inline |
Current LFO value (bipolar, float)
Definition at line 97 of file lfo.hpp.
References sbl::dsp::primitives::PhaseAccumulator::phase(), and sbl::dsp::primitives::WavetableReader< Size >::read().
|
inline |
Current phase.
Definition at line 102 of file lfo.hpp.
References sbl::dsp::primitives::PhaseAccumulator::phase().
|
inline |
Current phase increment.
Definition at line 105 of file lfo.hpp.
References sbl::dsp::primitives::PhaseAccumulator::increment().
|
friend |