Class fx_variable_delay¶
Defined in File dm_fx_variable_delay.h
Inheritance Relationships¶
Base Type¶
public fx_effect(Class fx_effect)
Class Documentation¶
-
class
fx_variable_delay: public fx_effect¶ Effect: Variable delay - foundational block of flangers and choruses.
The variable delay effect is the basis for a number of time-varying delay effects like chorus, flanger, phaser, vibrato, Leslie simulator, etc.
Here’s a nice tutorial on how variable delays work in these various building blocks: https://www.dsprelated.com/freebooks/pasp/Time_Varying_Delay_Effects.html
Example: ___var_del_1.c___
Public Functions
-
fx_variable_delay(float rate_hz, float depth, float feedback, OSC_TYPES mod_type)¶ Basic constructor/initializer for variable delay.
- Parameters
[in] rate_hz: The modulation rate in Hz[in] depth: The modulation depth (0.0 -> 1.0)[in] feedback: The feedback from output to input (-1.0 -> 1.0)[in] mod_type: The shape of the waveform used to modulate (e.g. OSC_SINE, OSC_TRI, etc.)
-
fx_variable_delay(float rate_hz, float depth, float feedback, float buf_size_ms, float mix_clean, float mix_delayed, OSC_TYPES mod_type, bool ext_mod)¶ Basic constructor/initializer for variable delay.
- Parameters
[in] rate_hz: The modulation rate in Hz[in] depth: The modulation depth (0.0 -> 1.0)[in] feedback: The feedback from output to input (-1.0 ->1.0)[in] buf_size_ms: The size of the audio in milliseconds (start wtih a value around 30)[in] mix_clean: The clean mix. If this is set to 0.0, then you’ll just get the pitch changing aspect of the wave that can used for tape delay simulators, etc.[in] mix_delayed: The delayed signal mix.[in] mod_type: The shape of the waveform used to modulate (e.g. OSC_SINE, OSC_TRI, etc.)[in] ext_mod: whether to use an external modulation source (set to true or false)
-
fx_variable_delay(float rate_hz, float depth, float feedback, float buf_size_ms, float mix_clean, float mix_delayed, OSC_TYPES mod_type, bool ext_mod, float initial_phase)¶ Basic constructor/initializer for variable delay.
- Parameters
[in] rate_hz: The modulation rate in Hz[in] depth: The modulation depth (0.0 -> 1.0)[in] feedback: The feedback from output to input (-1.0 ->1.0)[in] buf_size_ms: The size of the audio in milliseconds (start wtih a value around 30)[in] mix_clean: The clean mix. If this is set to 0.0, then you’ll just get the pitch changing aspect of the wave that can used for tape delay simulators, etc.[in] mix_delayed: The delayed signal mix.[in] mod_type: The shape of the waveform used to modulate (e.g. OSC_SINE, OSC_TRI, etc.)[in] ext_mod: whether to use an external modulation source (set to true or false)[in] initial_phase: Initial phase in degrees
-
void
enable()¶ Enable the this_effect (it is enabled by default)
-
void
bypass()¶ Bypass the this_effect (will just pass clean audio through)
-
void
set_depth(float depth)¶ Updates the depth of the variable delay.
- Parameters
[in] depth: The new depth value
-
void
set_rate_hz(float rate_hz)¶ Updates the rate (Hz) of the variable delay.
- Parameters
[in] rate_hz: The new rate hz
-
void
set_feedback(float feedback)¶ Updates the feedback parameter of the variable delay.
- Parameters
[in] feedback: The new feedback value (-1.0->1.0)
-
void
set_mix_clean(float mix_clean)¶ Updates the clean mix of the variable delay.
- Parameters
[in] mix_clean: The new clean mix value
-
void
set_mix_delayed(float mix_delayed)¶ Updates the delayed signal mix of the variable delay.
- Parameters
[in] mix_delayed: The new delayed mix value
-
void
set_lfo_type(OSC_TYPES new_type)¶ Sets the the type of oscillator used as the LFO.
- Parameters
[in] new_type: The new type of LFO (OSC_TYPES)
-
void
print_params(void)¶ Prints the parameters for this effect.
Public Members
-
fx_audio_node *
input¶ Audio routing node [input]: primary audio input
-
fx_audio_node *
output¶ Audio routing node [output]: primary audio output
-
fx_audio_node *
ext_mod_in¶ Audio routine node [input]: use another signal as the modulator source such as an fx_oscillator. The oscillator can be run though the clipper for example to create new types of waveforms.
-
fx_audio_node *
modulated_out¶ Audio routing node [output]: just the pitch modulated signal without mixing in the original signal
-
fx_control_node *
depth¶ Control routing node [input]: modulation depth
-
fx_control_node *
rate_hz¶ Control routing node [input]: modulation rate in Hz
-
fx_control_node *
feedback¶ Control routing node [input]: feedback
-
fx_control_node *
mix_clean¶ Control routing node [input]: clean signal mix
-
fx_control_node *
mix_delayed¶ Control routing node [input]: delayed signal mix
-