A sawtooth oscillator, with optional BLEP. More...
#include <marvin_Oscillator.h>
Public Member Functions | |
~SawOscillator () noexcept override=default | |
SampleType | operator() () noexcept override |
SampleType | operator() (SampleType phase) noexcept override |
![]() | |
virtual | ~OscillatorBase () noexcept=default |
virtual void | initialise (double sampleRate) |
virtual void | reset () noexcept |
void | setFrequency (SampleType newFrequency) noexcept |
void | setPhaseOffset (SampleType newPhaseOffset) noexcept |
Additional Inherited Members | |
![]() | |
void | incrementPhase () noexcept |
![]() | |
double | m_sampleRate {} |
SampleType | m_phaseIncrement { static_cast<SampleType>(0.0) } |
SampleType | m_phase { static_cast<SampleType>(0.0) } |
SampleType | m_phaseOffset { static_cast<SampleType>(0.0) } |
A sawtooth oscillator, with optional BLEP.
|
overridedefaultnoexcept |
|
nodiscardoverridevirtualnoexcept |
Processes the next sample of the wave, handling phase increments internally. Make sure to call prepareToPlay and setFrequency before calling this function!
Implements marvin::dsp::oscillators::OscillatorBase< SampleType >.
|
nodiscardoverridevirtualnoexcept |
Processes the next sample of the wave, using the provided phase - this overload will not update the internal phase of the oscillator, so the caller is entirely responsible for incrementing the phase according to frequency, etc. Does not require you to call initialise beforehand for this reason.
phase | The phase the oscillator should use, between 0 to 1. |
Implements marvin::dsp::oscillators::OscillatorBase< SampleType >.