home/ atoms/ adsr-envelope

An ADSR envelope shapes a parameter over four gate-driven stages: attack, decay, sustain, release

An ADSR envelope generates a control shape that governs how a parameter — usually amplitude, but equally filter cutoff or any target — evolves over the lifetime of a note, driven by a gate signal. Attack is the time to rise from zero to peak after the gate goes high (note-on). Decay is the time to fall from peak to the sustain level. Sustain is a level, not a time: the value held for as long as the gate stays high (a common misconception is that decay falls to zero rather than to the sustain level). Release is the time to fall back to zero after the gate goes low (note-off). Implemented in code it is naturally a finite state machine (idle → attack → decay → sustain → release): internal thresholds drive some transitions while the gate forces attack from any state and forces release on note-off; idle and sustain have no internal exit and move only on the gate. The gate need not come from a keyboard — an LFO or sequencer can drive it. Linear segments sound mechanical; exponential/curved segments better match perceived loudness and are used in most synthesizers.

Examples

Plucked string: fast attack, moderate decay, zero sustain, short release. String pad: slow attack, high sustain, long release. Piano: fast attack, fast decay, no sustain, longer release; an organ has fast attack and near-full sustain. Strudel: .adsr(.01, .2, .5, .3). SuperCollider: EnvGen.kr(Env.adsr(1.5, 1.5, 0.5, 4), gate: gate, doneAction: 2).

Assessment

Design ADSR settings for a plucked string, a slow pad, and a staccato stab, and say which parameter controls the pluck feel. Draw the state diagram, labelling what triggers each transition (what exits decay? what exits sustain? can idle go straight to decay?). Explain the difference between a sustain of 0% and 100%, what happens if the gate releases before decay finishes, and why exponential segments sound more natural than linear ones.

“The ADSR (attack-decay-sustain-release) envelope”
“Note that the Idle and Sustain states have no exit rules. Moves out of these states are driven by a _gate_ signal”
corpus · envelope-generators-adsr-design-exponential-vs-linear-segmen · chunk 1
“ADSR stands for Attack, Decay, Sustain, Release”
corpus · getting-started-envelopes-vcas-and-attenuators-noise-enginee · chunk 2
“There are four components to the sound envelope—attack, decay, sustain, and release. Attack represents the way in which the sound starts from an initial low and then reaches a peak value. Decay is the way a sound fades away.”
corpus · michael-hewitt-music-theory-for-computer-musicians · chunk 6
“ADSR stages: **Attack**, **Decay**, **Sustain**, and **Release**.”
corpus · surge-xt-official-user-manual-surge-synth-team · chunk 6
“attack, (initial) decay, sustain (a period that depends, for example, on how long a key on a keyboard is depressed), and release. The usual acronym for such a four-stage envelope is ADSR”
corpus · the-computer-music-tutorial-curtis-roads-archive-org-copy · chunk 22
“If we want a patch to start loud and die out slowly like a cymbal or start out quiet and slowly become louder like a violin an envelope could be used to control the amplitude.”
corpus · welsh-s-synthesizer-cookbook-figures-in-supercollider-cookbo · chunk 6