Skip to content

Connecting LFOs

Amp connections

Connecting an LFO to your synth amp will replace any existing envelope you have setup, and will take over the final amp output.

gml
LFO = synth_add_lfo(synth, synth_waveform_sine);

// Default value, optional
var _release = 0.1;

synth_connect_lfo_amp(synth, LFO, _release);

Amp connections support an optional release which works the same as an ADSR envelope's release and triggers once a note is released. During the release of a note, the LFO will not modulate the amp, and the sound will fade out cleanly.

Panning connections

There are no additional parameters when connecting an LFO to synth panning:

gml
synth_connect_lfo_panning(synth, LFO);

LFO connections to synth panning are multiplied to any existing panning setting you've applied with synth_set_panning(). This means that if you manually pan your synth all the way to one side, an LFO will only modify that side. Modulations to panning only apply to stereo synths.

Pitch connections

Pitch connections are a feature of SynthEnginePro, the documentation for them can be found here.

Managing connections

While SynthEngine supports any number of LFOs, each connection only supports a single LFO at a time. Connecting an LFO to a destination will break any previous connections. In the case of amp LFOs, setting an envelope will replace that connection.

gml
// This will disconnect any amp LFOs and use the envelope instead
synth_amp_envelope_adsr(synth, 0.1, 0, 1, 1);

// This will disconnect any panning LFOs
synth_disconnect_lfo_panning(synth);