MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ reset()

void MayaFlux::Nodes::Generator::Sine::reset ( float  frequency = 440,
double  amplitude = 0.5,
float  offset = 0 
)

Resets the oscillator's phase and parameters.

Parameters
frequencyNew frequency in Hz (default: 440Hz)
amplitudeNew amplitude (default: 0.5)
offsetNew DC offset (default: 0)

This method resets the oscillator's internal state and parameters, effectively restarting it from the beginning of its cycle.

Definition at line 152 of file Sine.cpp.

153{
154 m_phase = 0;
155 m_frequency = frequency;
156 m_amplitude = amplitude;
157 m_offset = offset;
158 update_phase_increment(frequency);
159}
float m_frequency
Base frequency of the generator.
double m_amplitude
Base amplitude of the generator.
double m_phase
Current phase of the generator.
float m_offset
DC offset added to the output.
Definition Sine.hpp:217
void update_phase_increment(double frequency)
Updates the phase increment based on a new frequency.
Definition Sine.cpp:54

References MayaFlux::Nodes::Generator::Generator::m_amplitude, MayaFlux::Nodes::Generator::Generator::m_frequency, m_offset, MayaFlux::Nodes::Generator::Generator::m_phase, and update_phase_increment().

Referenced by clear_modulators().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: