Class fx_oscillator¶
Defined in File dm_fx_oscillators.h
Inheritance Relationships¶
Base Type¶
public fx_effect
(Class fx_effect)
Class Documentation¶
-
class
fx_oscillator
: public fx_effect¶ Utility: Oscillator that can has both audio and control outputs.
Public Functions
-
fx_oscillator
(OSC_TYPES osc_type, float freq, float amplitude)¶ Basic constructor for an oscillator when used as an audio source.
- Parameters
[in] osc_type
: The osc type (see OSC_TYPES)[in] freq
: The frequency in Hz[in] amplitude
: The amplitude (linear scale e.g. 0.0 -> 1.0 typically)
-
fx_oscillator
(OSC_TYPES osc_type, float freq, float amplitude, float initial_phase)¶ Basic constructor for an oscillator used as a control source.
- Parameters
[in] osc_type
: The osc type (see OSC_TYPES)[in] freq
: The frequency in Hz[in] amplitude
: The amplitude (linear scale e.g. 0.0 -> 1.0 typically)[in] initial
: phase The initial phase of the oscillator in degrees (0-360)
-
void
enable
()¶ Enable the oscillator (it is enabled by default)
-
void
bypass
()¶ Bypass the oscillator (it will provide just a constant value)
-
void
set_frequency
(float freq)¶ Upates the frequency in Hz of the current oscillator.
- Parameters
[in] freq
: The frequency in Hz
-
void
set_amplitude
(float amplitude)¶ Updates the amplitude for the current oscillator.
- Parameters
[in] amplitude
: The amplitude (linear)
-
void
set_oscillator_type
(OSC_TYPES new_type)¶ Sets the oscillator type.
- Parameters
[in] new_type
: The new type of oscillator (OSC_TYPES)
-
void
print_params
(void)¶ Print the parameters for this effect.
Public Members
-
fx_audio_node *
output
¶ Audio routing node: primary audio oscillator output
-
fx_control_node *
freq
¶ Control routing node: frequency of the oscillator in Hz
-
fx_control_node *
amplitude
¶ Control routing node: amplitude of the oscillator (linear, typically between 0.0 and 1.0)
-
fx_control_node *
offset
¶ Control routing node: The DC offset of the amplifier. Useful if you’re using this to control parameters in ranges not centered around 0.0.
-
fx_control_node *
value
¶ Control routing node: The current value of the oscillator. Connect this node to external oscillator nodes for effects.
-