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

◆ reset()

void MayaFlux::Nodes::Generator::Impulse::reset ( float  frequency = 1,
float  amplitude = 1.0F,
float  offset = 0 
)

Resets the generator's phase and parameters.

Parameters
frequencyNew frequency in Hz (default: 1Hz)
amplitudeNew amplitude (default: 1.0)
offsetNew DC offset (default: 0)

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

Definition at line 161 of file Impulse.cpp.

162{
163 m_phase = 0.0;
164 m_amplitude = amplitude;
165 m_offset = offset;
166 set_frequency(frequency);
167 m_last_output = 0.0;
168}
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 Impulse.hpp:252
void set_frequency(float frequency) override
Sets the generator's frequency.
Definition Impulse.cpp:51
double m_last_output
The most recent sample value generated by this oscillator.
Definition Node.hpp:378

References MayaFlux::Nodes::Generator::Generator::m_amplitude, MayaFlux::Nodes::Node::m_last_output, m_offset, MayaFlux::Nodes::Generator::Generator::m_phase, and set_frequency().

+ Here is the call graph for this function: