|
Gin
|
State storage for oscillator functions in AudioEquationParser. More...
#include <gin_audiofunctions.h>
Public Member Functions | |
| OscState (double sr) | |
| void | incPhase (float note) |
| void | reset () override |
Public Member Functions inherited from FuncState | |
| FuncState (double sr) | |
| virtual | ~FuncState ()=default |
| virtual void | setSampleRate (double sr) |
Public Attributes | |
| float | phase { juce::Random::getSystemRandom().nextFloat() } |
| float | lastNote = -1.0f |
| float | frequency = -1.0f |
| float | delta = -1.0f |
Public Attributes inherited from FuncState | |
| double | sampleRate = 44100.0 |
State storage for oscillator functions in AudioEquationParser.
OscState maintains the phase accumulator and frequency conversion for oscillator functions. It automatically converts MIDI note numbers to Hz and calculates phase increment for accurate oscillation at the current sample rate.
| OscState::OscState | ( | double | sr | ) |
References delta, frequency, lastNote, phase, and FuncState::sampleRate.
Referenced by incPhase(), and reset().
| float OscState::lastNote = -1.0f |
Referenced by incPhase().
| float OscState::frequency = -1.0f |
Referenced by incPhase().
| float OscState::delta = -1.0f |
Referenced by incPhase().