1 #ifndef __RampOscillator_h
2 #define __RampOscillator_h
57 float sample = 2*
phase-1;
68 for(
size_t i=0; i<len; ++i){
69 float sample = 2*
phase-1;
77 sample -= t*t + t+t + 1;
void setPhase(float ph)
Set current oscillator phase in radians.
void generate(FloatArray output)
Note: mixing sample based and block based generate() calls is not supported by this class.
static constexpr float begin_phase
static constexpr float end_phase
AntialiasedRampOscillator(float sr)
void reset()
Reset oscillator (typically resets phase)
AntialiasedRampOscillator()
This class contains useful methods for manipulating arrays of floats.
Inverted ramp oscillator generates falling output values from 1 to -1.
static constexpr float begin_phase
InvertedRampOscillator(float sr)
static constexpr float end_phase
static float polyblep(float t, float dt)
Calculate poly blep antialiasing compensation on normalised (to range [0, 1]) phase and phase increme...
void setPhase(float ph)
Set current oscillator phase in radians.
void reset()
Reset oscillator (typically resets phase)
void setSampleRate(float sr)
Ramp oscillator generates rising output values from -1 to 1.
static constexpr float begin_phase
static constexpr float end_phase