OpenWareLaboratory
|
Public Member Functions | |
float | generate () |
Produce the next consecutive sample. More... | |
float | generate (float fm) |
Produce a sample with frequency modulation. More... | |
void | generate (FloatArray output) |
Produce a block of samples. More... | |
void | generate (FloatArray output, FloatArray fm) |
Produce a block of samples with frequency modulation. More... | |
float | getFrequency () |
Get oscillator frequency in Hertz. More... | |
float | getNextSample () |
float | getNextSample (float fm) |
float | getPhase () |
Get current oscillator phase in radians. More... | |
float | getSample () |
float | getSampleRate () |
void | getSamples (FloatArray output) |
void | getSamples (FloatArray output, FloatArray fm) |
void | reset () |
Reset oscillator (typically resets phase) More... | |
void | setFrequency (float freq) |
Set oscillator frequency in Hertz. More... | |
void | setPhase (float ph) |
Set current oscillator phase in radians. More... | |
void | setSampleRate (float sr) |
Set oscillator sample rate. More... | |
SineOscillator () | |
SineOscillator (float sr) | |
Static Public Member Functions | |
static SineOscillator * | create (float sr) |
static void | destroy (SineOscillator *osc) |
Static Public Attributes | |
static constexpr float | begin_phase = 0 |
static constexpr float | end_phase = 2*M_PI |
Static Protected Member Functions | |
static float | polyblep (float t, float dt) |
Calculate poly blep antialiasing compensation on normalised (to range [0, 1]) phase and phase increment (angular rate) values. More... | |
Protected Attributes | |
float | incr |
float | mul |
float | phase |
Definition at line 6 of file SineOscillator.h.
|
inline |
Definition at line 10 of file SineOscillator.h.
|
inline |
Definition at line 11 of file SineOscillator.h.
References OscillatorTemplate< SineOscillator >::setSampleRate().
|
inlinestaticinherited |
Definition at line 115 of file Oscillator.h.
|
inlinestaticinherited |
Definition at line 120 of file Oscillator.h.
|
inlinevirtualinherited |
Produce the next consecutive sample.
Reimplemented from Oscillator.
Definition at line 99 of file Oscillator.h.
|
inlinevirtualinherited |
Produce a sample with frequency modulation.
Implements Oscillator.
Definition at line 106 of file Oscillator.h.
|
inlinevirtual |
Produce a block of samples.
Reimplemented from SignalGenerator.
Definition at line 17 of file SineOscillator.h.
References end_phase, SimpleArray< T >::getSize(), OscillatorTemplate< SineOscillator >::incr, and OscillatorTemplate< SineOscillator >::phase.
Referenced by VosimOscillator::generate().
|
inlinevirtual |
Produce a block of samples with frequency modulation.
Reimplemented from Oscillator.
Definition at line 25 of file SineOscillator.h.
References end_phase, SimpleArray< T >::getSize(), OscillatorTemplate< SineOscillator >::incr, and OscillatorTemplate< SineOscillator >::phase.
|
inlinevirtualinherited |
Get oscillator frequency in Hertz.
Implements Oscillator.
Definition at line 86 of file Oscillator.h.
|
inlineinherited |
Definition at line 55 of file Oscillator.h.
References Oscillator::generate().
|
inlineinherited |
Definition at line 57 of file Oscillator.h.
References Oscillator::generate().
|
inlinevirtualinherited |
Get current oscillator phase in radians.
Implements Oscillator.
Definition at line 92 of file Oscillator.h.
|
inline |
Definition at line 14 of file SineOscillator.h.
References OscillatorTemplate< SineOscillator >::phase.
|
inlineinherited |
Definition at line 80 of file Oscillator.h.
|
inlineinherited |
Definition at line 59 of file Oscillator.h.
References Oscillator::generate().
|
inlineinherited |
Definition at line 63 of file Oscillator.h.
References Oscillator::generate().
|
inlinestaticprotectedinherited |
Calculate poly blep antialiasing compensation on normalised (to range [0, 1]) phase and phase increment (angular rate) values.
Definition at line 128 of file Oscillator.h.
|
inlinevirtualinherited |
Reset oscillator (typically resets phase)
Implements Oscillator.
Definition at line 96 of file Oscillator.h.
|
inlinevirtualinherited |
Set oscillator frequency in Hertz.
Implements Oscillator.
Definition at line 83 of file Oscillator.h.
|
inlinevirtualinherited |
Set current oscillator phase in radians.
phase | a value between 0 and 2*pi |
Implements Oscillator.
Definition at line 89 of file Oscillator.h.
|
inlinevirtualinherited |
Set oscillator sample rate.
Reimplemented from Oscillator.
Definition at line 75 of file Oscillator.h.
|
staticconstexpr |
Definition at line 8 of file SineOscillator.h.
|
staticconstexpr |
Definition at line 9 of file SineOscillator.h.
Referenced by generate().
|
protectedinherited |
Definition at line 73 of file Oscillator.h.
|
protectedinherited |
Definition at line 71 of file Oscillator.h.
|
protectedinherited |
Definition at line 72 of file Oscillator.h.