Sine wave oscillator. More...
#include <ame_Oscillator.hpp>
Public Member Functions | |
| SineOscillator (FloatType sampleRate) noexcept | |
| Create sine wave oscillator instance. More... | |
| void | setSampleRate (FloatType sampleRate) |
| Set sampling rate. More... | |
| void | setFrequency (FloatType freq) noexcept |
| Set the sine wave frequency. More... | |
| float | nextSample () noexcept |
| Generate single sample. More... | |
| void | resetPhase (FloatType newPhase=0.0f) |
| Reset the phase to any value. More... | |
Sine wave oscillator.
Generates a sine between -1.0~1.0.
|
inlinenoexcept |
Create sine wave oscillator instance.
| sampleRate | The sample rate that will be used for calculate the oscillator phase increment. |
| frequency | Initial frequency |
|
inlinenoexcept |
Generate single sample.
|
inline |
Reset the phase to any value.
| newPhase | [0, 2pi] |
|
inlinenoexcept |
Set the sine wave frequency.
| freq | frequency in Hz |
|
inline |
Set sampling rate.
| sampleRate | new sampling rate in Hz |