Class fx_instrument_synth¶
Defined in File dm_fx_instrument_synth.h
Inheritance Relationships¶
Base Type¶
public fx_effect
(Class fx_effect)
Class Documentation¶
-
class
fx_instrument_synth
: public fx_effect¶ Effect: Polyphonic instrument synth.
The instrument synth is capable of reading polyphonic notes from a stringed instrument and playing synth notes in their place.
The instrument synth does not have an input. It is hard-wired into the instrument in jack of the pedal.
Public Functions
-
fx_instrument_synth
(OSC_TYPES osc_type, float attack_ms, float filter_resonance, float filter_response)¶ Constructs a new instance of the instrument synth (basic constructor)
- Parameters
[in] osc_type
: The type of oscillator[in] attack_ms
: The attack milliseconds[in] filter_resonance
: The filter resonance (1.0 is normal, > 1 increases resonance)[in] filter_response
: How much the filter sweeps (0.0 to 1.0)
-
fx_instrument_synth
(OSC_TYPES osc_type, OSC_TYPES fm_mod_osc_type, float fm_mod_depth, float freq_ratio, float freq_ratio_fm_mod, float attack_ms, float filter_resonance, float filter_response)¶ Constructs a new instance of the instrument synth (advanced constructor)
- Parameters
[in] osc_type
: The type of oscillator[in] fm_mod
: The type of oscillator used for fm synthesis[in] fm_mod_depth
: The depth of the fm synthesis (0.0 to 1.0)[in] freq_ratio
: The frequency ratio of played note to synth note (e.g. 1.0 is same, 0.5 is octave down, 2.0 is octave up)[in] freq_ratio_fm_mod
: The frequency ratio of the fm modulation to synthesized note[in] attack_ms
: The attack milliseconds[in] filter_resonance
: The filter resonance (1.0 is normal, > 1 increases resonance)[in] filter_response
: How much the filter sweeps
-
void
enable
()¶ Enable the instrument synth (it is enabled by default)
-
void
bypass
()¶ Bypass the instrument synth (will just pass zero audio through)
-
void
set_freq_ratio
(float ratio)¶ Sets the frequency ratio of the synth.
- Parameters
[in] ratio
: Ratio of synthesized frequency to note playing. For example, a value of 1.0 would play the same note. A value of 0.5 would play a note an octave below. A value of 2.0 would play a note an octave above.
-
void
set_fm_mod_ratio
(float fm_mod_ratio)¶ Sets the fm modifier ratio.
- Parameters
[in] fm_mod_ratio
: The fm modifier ratio relative to the frequency of the tone being played
-
void
set_fm_mod_depth
(float depth)¶ Sets the fm modifier depth.
- Parameters
[in] depth
: The FM mod depth (0.0 -> 1.0)
-
void
set_attack_ms
(float attack_ms)¶ Sets the attack milliseconds.
- Parameters
[in] attack_ms
: The attack milliseconds
-
void
set_filter_resonance
(float resonance)¶ Sets the filter resonance.
- Parameters
[in] resonance
: The resonance of the filter
-
void
set_filter_response
(float response)¶ Sets the filter responsiveness.
- Parameters
[in] response
: The response (0.0 is not responsive / static filter, 1.0 is very dynamic filter)
-
void
set_oscillator_type
(OSC_TYPES new_type)¶ Sets the the type of oscillator used as the primary synth.
- Parameters
[in] new_type
: The new type of LFO (OSC_TYPES)
-
void
set_oscillator_type_fm_mod
(OSC_TYPES new_type)¶ Sets the the type of oscillator used as the primary synth.
- Parameters
[in] new_type
: The new type of LFO (OSC_TYPES)
-
void
print_params
(void)¶ Prints the parameters for the instrument synth.
Public Members
-
fx_audio_node *
output
¶ Audio routing node: primary audio output
-
fx_control_node *
attack_ms
¶ Control routing node: Attack (ms) - attack rate of the synth in milliseconds
-
fx_control_node *
freq_ratio
¶ Control routing node: Frequency ratio - Ratio of synthesized frequency to note playing. For example, a value of 1.0 would play the same note. A value of 0.5 would play a note an octave below. A value of 2.0 would play a note an octave above.
-
fx_control_node *
fm_mod_freq_ratio
¶ Control routing node: Frequency ratio of fm modulator - Ratio of fm modulator frequency to synth frequency. A value of 1.0 would do fm mod at same frequency as note being synthesized.
-
fx_control_node *
fm_mod_depth
¶ Control routing node: Frequency mod depth
-
fx_control_node *
resonance
¶ Control routing node: Filter resonance - The resonance of the filter applied each synth voice. A value of 1.0 is no resonance, value higher than 1.0 increases resonance. Values below 1.0 (but higher than 0.0) further smooth out the filter.
-
fx_control_node *
response
¶ Control routing node: Filter response - How far the filter sweeps with each played note
-