home/ modules/ envelopes-and-modulation

Envelopes, LFOs, and modulation routing

  • learner can shape a parameter over time with ADSR/AR envelopes and choose curve, trigger modes, and time scaling for the musical goal
  • learner can add movement and dynamics to a voice by routing an LFO to a synthesis parameter and mapping note velocity to amplitude
  • learner can articulate a subtractive voice by routing an envelope to filter cutoff and amplitude (VCA)

Build a single synth voice whose brightness and loudness evolve expressively: route one envelope to filter cutoff, another to a VCA, add an LFO for movement and a velocity-to-amp mapping — then play a phrase that demonstrates all four modulations.

A static patch is a demo; a patch that moves is an instrument. In a live-coded or synth-driven set — a techno bassline that bites harder on downbeats, a pad that breathes under a trance kick — everything the audience hears as “expression” is modulation: control signals reshaping pitch, amplitude, and brightness note by note. This module builds toward one whole task: a single subtractive voice (in Surge XT or any softsynth/modular rig) where a filter envelope, an amp envelope, an LFO, and velocity all audibly do their jobs in a played phrase.

The arc starts fully supported. First, hear what an envelope even is — a control curve, not audio — and drill the four ADSR stages by ear on amplitude alone. “A voltage-controlled amplifier driven by an envelope generator shapes a sound’s loudness over time” is your first JIT pointer; “Routing an envelope to filter cutoff is the core articulation move of subtractive synthesis” is the second, turning the same gesture toward timbre. From there, scaffolding is progressively removed: you choose segment curves yourself (guided by why exponential segments sound perceptually linear), pick trigger modes for drum-style one-shots, add cyclical motion with an LFO and decide sync-per-note versus free-running, map keystroke velocity to amplitude so the phrase responds to touch, and finally patch the capstone voice with no recipe — just the phrase that proves all four routings.

The required atoms gate the capstone: without envelope stages, VCA and cutoff routing, trigger behavior, LFO placement, and the velocity-to-amplitude mapping, the voice cannot be built or debugged. Supporting atoms widen the craft — ADBDR piano shapes, envelope followers as audio-derived modulation sources, sidechain ducking as trance’s signature pump, humanisation, and Surge XT’s DAHDSR-per-LFO, MSEG, and modulator-of-modulators — showing where the same routing logic goes next.

Runnable examples

Generated from the context/ instrument corpus by concept (redistributable idioms only). Do not edit — regenerate with gen-module-examples.mjs.

amplitude-lfo

osc 440 * lftri 1 >> audio

punctual-0003 · CC0-1.0

s("bd*4").gain(sine.range(0.5,1).fast(4))

strudel-0040 · CC0

adsr-envelope

note("c3").s("sawtooth").attack(0.01).decay(0.1).sustain(0.6).release(0.3)

strudel-0205 · CC0

{ Saw.ar(220) * EnvGen.kr(Env.perc(0.001, 0.2), Impulse.kr(2)) * 0.3 }.play

supercollider-0013 · CC0

vibrato

saw (midicps $ 24 +- 0.03 $ osc 6) >> audio

punctual-0005 · CC0-1.0

{ SinOsc.ar(SinOsc.kr(6).range(430, 450), 0, 0.2) }.play

supercollider-0006 · CC0

sidechain-pump

note("c2").s("sawtooth").duckorbit(1).duck("bd*4")

strudel-0017 · CC0

~duck: imp 4 >> envperc 0.001 0.15 >> mul -1.0 >> add 1.0
out: saw 110 >> lpf 600 1.0 >> mul ~duck >> mul 0.3

glicol-0029 · MIT

Atoms in this module

Required — these gate the capstone

A synthesis envelope is a control curve that shapes a parameter of the generated signal over time
Concept L1 Foundations B
An envelope generator outputs a time-varying control signal that shapes another module's parameter over each note
Concept L1 Foundations BE
Envelopes are built from named segments; sustain level is set by the designer but its duration by the performer
Concept L1 Foundations B
An ADSR envelope shapes a parameter over four gate-driven stages: attack, decay, sustain, release
Concept L1 Foundations BEA
The ADSR extends the AR envelope by adding separate Decay and Sustain stages, enabling fast attack with slow decay
Concept L2 First instrument B
The simplest AR envelope is a gate fed through a one-pole filter whose coefficient sets attack and release time
Concept L3 Craft B
Exponential (not linear) envelope segments sound perceptually linear because hearing is logarithmic
Principle L2 First instrument B
A voltage-controlled amplifier driven by an envelope generator shapes a sound's loudness over time
Concept L2 First instrument BE
A filter cutoff envelope mimics the brightness-decay of acoustic instruments
Concept L1 Foundations B
Routing an envelope to filter cutoff is the core articulation move of subtractive synthesis
Procedure L2 First instrument BE
Trigger mode lets a drum envelope complete its decay regardless of note-off timing
Concept L2 First instrument B
In trigger mode, the attack phase functions as a pre-delay before the sound starts
Concept L2 First instrument B
As an LFO crosses into the audio range it stops being perceptible parameter movement and starts creating sidebands
Concept L1 Foundations BE
LFO sync determines whether timbral modulation restarts with each note or runs continuously
Concept L2 First instrument B
A synth maps a note number to frequency and keystroke velocity to amplitude before any sound is generated
Concept L1 Foundations B
A global time scalar stretches or compresses all envelopes simultaneously, preserving their shape ratios
Concept L2 First instrument B

Supporting — enrichment, not gating

ADBDR's two decay slopes model a piano better than ADSR's flat sustain
Concept L2 First instrument B
Constant-rate ADSR release keeps the fall rate fixed, so releasing from a lower sustain takes less time
Principle L4 Performance B
A single targetRatio parameter morphs an ADSR segment's shape from near-exponential to near-linear
Principle L4 Performance B
Filtering an LFO with a lowpass filter smooths abrupt transitions and removes click artifacts
Procedure L2 First instrument BN
An LFO is a sub-audio oscillator used as a control source to cyclically modulate another module's parameter
Concept L1 Foundations EB
An envelope follower extracts a control signal that tracks a sound's amplitude contour over time
Concept L2 First instrument BDJ
Sidechain keying drives a compressor's level detection from a different signal than the one being compressed
Concept L1 Foundations D
Uplifting trance ducks its background strings and synths against the kick to create an audible off-beat pump
Concept L2 First instrument BD
Subtle automation or randomisation of envelope and pitch parameters emulates the organic variability of live instruments
Procedure L3 Craft BA
Every Surge XT LFO has a built-in 6-stage DAHDSR envelope that shapes modulation depth over note lifetime
Concept L2 First instrument B
Surge XT's MSEG provides fully editable multi-segment envelopes with looping, node types, and curve controls
Concept L3 Craft B
In Surge XT you can modulate one LFO's parameters with any other modulation source
Concept L3 Craft B
Surge XT's Formula modulator runs Lua scripts that read voice/MIDI state and output arbitrary modulation curves
Concept L4 Performance B
Almost any timbral intent reduces to five axes: spectral tilt, harmonic complexity, amplitude envelope, modulation movement, and space/width
Concept L2 First instrument BF