OpenWareLaboratory
|
Public Member Functions | |
ChirpOscillator (float sr=48000) | |
float | generate () |
Produce the next consecutive sample. More... | |
float | generate (float fm) |
Produce a sample with frequency modulation. More... | |
virtual void | generate (FloatArray output) |
Produce a block of samples. More... | |
virtual 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 | 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 phase) |
Set current oscillator phase in radians. More... | |
void | setRate (float r) |
Set rate of change: positive for ascending chirp, negative for descending. More... | |
void | setSampleRate (float sample_rate) |
Set oscillator sample rate. More... | |
void | trigger () |
Static Public Member Functions | |
static ChirpOscillator * | create (float sr) |
static void | destroy (ChirpOscillator *osc) |
Definition at line 6 of file ChirpOscillator.h.
|
inline |
Definition at line 14 of file ChirpOscillator.h.
Referenced by create().
|
inlinestatic |
Definition at line 64 of file ChirpOscillator.h.
References ChirpOscillator().
|
inlinestatic |
Definition at line 67 of file ChirpOscillator.h.
|
inlinevirtual |
Produce the next consecutive sample.
Reimplemented from SignalGenerator.
Definition at line 50 of file ChirpOscillator.h.
References M_PI.
|
inlinevirtual |
Produce a sample with frequency modulation.
Implements Oscillator.
Definition at line 58 of file ChirpOscillator.h.
|
inlinevirtualinherited |
Produce a block of samples.
Reimplemented in VosimOscillator, VoiceAllocatorSignalGenerator< Allocator, SynthVoice, VOICES >, AntialiasedSquareWaveOscillator, SineOscillator, SampleOscillator< im >, AntialiasedRampOscillator, PolyBlepOscillator, and MorphingOscillator.
Definition at line 25 of file SignalGenerator.h.
References SignalGenerator::generate(), and SimpleArray< T >::getSize().
|
inlinevirtualinherited |
Produce a block of samples with frequency modulation.
Reimplemented in VosimOscillator, SineOscillator, SampleOscillator< im >, PolyBlepOscillator, and MorphingOscillator.
Definition at line 50 of file Oscillator.h.
References Oscillator::generate(), and SimpleArray< T >::getSize().
|
inlinevirtual |
Get oscillator frequency in Hertz.
Implements Oscillator.
Definition at line 20 of file ChirpOscillator.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().
|
inlinevirtual |
Get current oscillator phase in radians.
Implements Oscillator.
Definition at line 44 of file ChirpOscillator.h.
|
inline |
Definition at line 26 of file ChirpOscillator.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().
|
inlinevirtual |
Reset oscillator (typically resets phase)
Implements Oscillator.
Definition at line 41 of file ChirpOscillator.h.
Referenced by trigger().
|
inlinevirtual |
Set oscillator frequency in Hertz.
Implements Oscillator.
Definition at line 16 of file ChirpOscillator.h.
References M_PI.
|
inlinevirtual |
Set current oscillator phase in radians.
phase | a value between 0 and 2*pi |
Implements Oscillator.
Definition at line 47 of file ChirpOscillator.h.
|
inline |
Set rate of change: positive for ascending chirp, negative for descending.
+1 doubles frequency in one second -1 halves frequency in one second
Definition at line 34 of file ChirpOscillator.h.
|
inlinevirtual |
Set oscillator sample rate.
Reimplemented from Oscillator.
Definition at line 23 of file ChirpOscillator.h.
|
inline |
Definition at line 37 of file ChirpOscillator.h.