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

◆ Phasor() [1/4]

MayaFlux::Nodes::Generator::Phasor::Phasor ( float  frequency = 1,
double  amplitude = 1,
float  offset = 0 
)

Basic constructor with fixed parameters.

Parameters
frequencyPhasor cycle rate in Hz (default: 1Hz, one cycle per second)
amplitudePhasor amplitude (default: 1.0)
offsetDC offset added to the output (default: 0.0)

Creates a phasor generator with fixed frequency and amplitude.

Definition at line 6 of file Phasor.cpp.

7 : m_offset(offset)
8 , m_frequency_modulator(nullptr)
9 , m_amplitude_modulator(nullptr)
10 , m_phase_wrapped(false)
11 , m_threshold_crossed(false)
12{
13 m_amplitude = amplitude;
14 m_frequency = frequency;
15 update_phase_increment(frequency);
16}
float m_frequency
Base frequency of the generator.
double m_amplitude
Base amplitude of the generator.
std::shared_ptr< Node > m_frequency_modulator
Node that modulates the frequency.
Definition Phasor.hpp:304
bool m_threshold_crossed
Flag indicating whether the threshold has been crossed in the current sample.
Definition Phasor.hpp:338
bool m_phase_wrapped
Flag indicating whether the phase has wrapped in the current sample.
Definition Phasor.hpp:333
std::shared_ptr< Node > m_amplitude_modulator
Node that modulates the amplitude.
Definition Phasor.hpp:309
void update_phase_increment(double frequency)
Updates the phase increment based on a new frequency.
Definition Phasor.cpp:60
float m_offset
DC offset added to the output.
Definition Phasor.hpp:299

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

+ Here is the call graph for this function: