Represents a single band-limited oscillator with multiple waveforms.
Definition Oscillator.h:42
void setSampleRate(double sampleRate)
Set the sample rate in Hz.
Definition Oscillator.cpp:187
Waveform
Waveform.
Definition Oscillator.h:47
@ Triangle
Triangle wave with all positive harmonics≤
@ TrueSaw
True sawtooth wave with alternating sign harmonics.
@ Saw
Sawtooth wave with all positive positive harmonics.
@ TrueTriangle
True triangle wave with alternating sign harmonics≤
void reset()
Reset the oscillator's phase/freq/amplitude to zero.
Definition Oscillator.cpp:149
auto nextSample() -> float
Compute the oscillator's next sample.
Definition Oscillator.cpp:154
void setParams(const Params &)
Set the oscillator's parameters.
Definition Oscillator.cpp:192
void setFrequency(double)
Set the oscillator's frequency.
Definition Oscillator.cpp:197
Oscillator parameters.
Definition Oscillator.h:60
double amplitude
Amplitude multiplier.
Definition Oscillator.h:62
double detune
Factor that will be multiplied with the oscillator's frequency.
Definition Oscillator.h:61
Waveform waveform
Waveform.
Definition Oscillator.h:63