DSPark 1.6.1
Header-only audio DSP framework in pure C++20 — zero dependencies
Loading...
Searching...
No Matches
Vibrato.h File Reference

Pitch modulation via LFO-driven variable delay. More...

#include "../Core/AudioBuffer.h"
#include "../Core/AudioSpec.h"
#include "../Core/DspMath.h"
#include "../Core/Phasor.h"
#include "../Core/RingBuffer.h"
#include "../Core/StateBlob.h"
#include <algorithm>
#include <atomic>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <numbers>
#include <vector>
Include dependency graph for Vibrato.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dspark::Vibrato< T >
 Professional-grade pitch vibrato with LFO FM and parameter smoothing. More...
 

Namespaces

namespace  dspark
 Main namespace for the DSPark framework.
 

Detailed Description

Pitch modulation via LFO-driven variable delay.

Modulates pitch by varying a short delay line with a primary LFO. Features FM modulation on the primary LFO for complex, non-static pitch variations, and parameter smoothing to prevent zipper noise during automation.

Threading: prepare() belongs to the setup thread; processBlock() and reset() belong to the audio thread. Setters are lock-free atomic publications, safe from any thread, consumed at the next processBlock(). Non-finite setter arguments are ignored.

Dependencies: Phasor.h, RingBuffer.h, DspMath.h, AudioSpec.h, AudioBuffer.h, StateBlob.h.

vibrato.prepare(spec);
vibrato.setRate(5.0f); // 5 Hz
vibrato.setDepth(0.5f); // 0.5 semitones
vibrato.processBlock(buffer);
Professional-grade pitch vibrato with LFO FM and parameter smoothing.
Definition Vibrato.h:64
void processBlock(AudioBufferView< T > buffer) noexcept
Processes audio in-place, applying vibrato per channel.
Definition Vibrato.h:126
void setDepth(T semitones) noexcept
Sets the vibrato pitch depth. Parameter is smoothed internally.
Definition Vibrato.h:265
void setRate(T hz) noexcept
Sets the primary LFO rate. Parameter is smoothed internally.
Definition Vibrato.h:253
void prepare(const AudioSpec &spec)
Allocates delay lines and settles the parameter smoothing state.
Definition Vibrato.h:81

Definition in file Vibrato.h.