|
| void | prepare (const AudioSpec &spec) |
| | Allocates delay lines and settles the parameter smoothing state.
|
| |
| void | processBlock (AudioBufferView< T > buffer) noexcept |
| | Processes audio in-place, applying vibrato per channel.
|
| |
| void | reset () noexcept |
| | Clears delay line memory and resets LFO phases.
|
| |
| void | setRate (T hz) noexcept |
| | Sets the primary LFO rate. Parameter is smoothed internally.
|
| |
| void | setDepth (T semitones) noexcept |
| | Sets the vibrato pitch depth. Parameter is smoothed internally.
|
| |
| void | setModRate (T hz) noexcept |
| | Sets the rate of the secondary FM oscillator.
|
| |
| void | setModDepth (T amount) noexcept |
| | Sets the intensity of the FM modulation on the primary LFO.
|
| |
| T | getRate () const noexcept |
| |
| T | getDepth () const noexcept |
| |
| T | getModRate () const noexcept |
| |
| T | getModDepth () const noexcept |
| |
| std::vector< uint8_t > | getState () const |
| | Serializes the parameter state (setup/UI threads; allocates).
|
| |
| bool | setState (const uint8_t *data, size_t size) |
| | Restores parameters from a blob (tolerant; rejects foreign ids).
|
| |
template<FloatType T>
class dspark::Vibrato< T >
Professional-grade pitch vibrato with LFO FM and parameter smoothing.
The modulation depth is specified in semitones. A secondary oscillator (FM) can modulate the primary LFO rate. Internally applies block-based parameter smoothing to ensure artifact-free automation.
All per-channel LFOs share the same phase, so the effect stays mono-compatible. Channels beyond those passed to prepare() are left untouched (pass-through), as is the whole buffer before prepare().
- Template Parameters
-
| T | Sample type (float or double). |
Definition at line 63 of file Vibrato.h.
Allocates delay lines and settles the parameter smoothing state.
The delay lines are sized for the deepest configuration the setters allow: 4 semitones at the 0.1 Hz rate floor. The peak delay request of that sweep is centre + deviation = 2 * deviation + offset (~35.4k samples at 48 kHz before the ring's power-of-two round-up), because the centre itself sits one deviation above the offset so the trough of the sweep never dips below it.
An invalid spec (non-positive or non-finite fields) is a no-op that keeps the previous state.
- Parameters
-
| spec | Audio environment specification. Defines num channels and sample rate. |
Definition at line 81 of file Vibrato.h.
Sets the intensity of the FM modulation on the primary LFO.
FM varies the speed of the vibrato LFO between (1 - amount) and (1 + amount) times the rate; the delay sweep keeps the width that depth and rate set, so the pitch excursion follows the instantaneous speed (up to twice the depth at full FM). Smoothed internally. While the depth is zero the FM oscillator holds its phase.
- Parameters
-
| amount | 0.0 (off) to 1.0 (full modulation), clamped. Non-finite values are ignored. |
Definition at line 298 of file Vibrato.h.