1 #ifndef __PolyBlepOscillator_h__
2 #define __PolyBlepOscillator_h__
5 #include "polyblep/dsp/oscillator.h"
11 stmlib::Oscillator osc;
12 float nfreq, shape, pw;
This class contains useful methods for manipulating arrays of floats.
An Oscillator is a SignalGenerator that operates at a given frequency and that can be frequency modul...
static PolyBlepOscillator * create(float sr)
void setFrequency(float freq)
Set oscillator frequency in Hertz.
void reset()
Reset oscillator (typically resets phase)
void getSamples(FloatArray output, FloatArray freq)
float generate()
Produce the next consecutive sample.
PolyBlepOscillator(float sr=48000)
float getPhase()
Get current oscillator phase in radians.
static void destroy(PolyBlepOscillator *osc)
void setSampleRate(float sr)
Set oscillator sample rate.
float getFrequency()
Get oscillator frequency in Hertz.
void setPhase(float phase)
Set current oscillator phase in radians.
void setShape(float value)
set waveform shape: 0.0 for saw, 1.0 for square wave
void setPulseWidth(float value)
set square wave pulse width: 0.0 to 1.0 for 0% to 100%