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

◆ set_frequency()

void MayaFlux::Nodes::Generator::Sine::set_frequency ( float  frequency)
overridevirtual

Sets the oscillator's frequency.

Parameters
frequencyNew frequency in Hz

Updates the oscillator's frequency while maintaining phase continuity to prevent clicks or pops in the audio output.

Reimplemented from MayaFlux::Nodes::Generator::Generator.

Definition at line 48 of file Sine.cpp.

49{
50 m_frequency = frequency;
51 update_phase_increment(frequency);
52}
float m_frequency
Base frequency of the generator.
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_frequency, and update_phase_increment().

+ Here is the call graph for this function: