← Back to Learn
Soundb Learn · Synthesis

Attack, Decay, Sustain, Release — and the Gate

ADSR in depth, the trigger-and-gate mechanism that explains why a held note sustains at all, and how to match an envelope to the way a real instrument behaves.

Topic
Synthesis
Level
Beginner
Format
Lesson
Time
13 min

An oscillator left alone drones forever at a constant level. Nothing about that resembles an instrument, and the difference between a drone and a note is entirely the work of an envelope.

An envelope generator produces no sound. It produces a value that changes over time, started by a note, and something else uses that value — most often the amplifier's gain and the filter's cutoff. It is a control source sitting alongside the audio path, not a stage within it.

The four stages

The standard shape is ADSR, and the one thing to fix in your head immediately is that three of the four are times and one is not.

  • Attack — a time. How long the envelope takes to travel from nothing to full level once the note begins. Zero gives an instant onset; longer values give a swell.
  • Decay — a time. How long it then takes to fall from full level down to the sustain level.
  • Sustain — a level. Where the envelope sits and stays while the note is held. It has no duration of its own, because the player supplies that.
  • Release — a time. How long the envelope takes to fall from wherever it was to nothing, once the note ends.

That single asymmetry accounts for a large share of all confusion about envelopes. Turning sustain up does not make notes last longer; it makes them sit higher while you hold them. If you want a note to ring on after you let go, the control is release.

Triggers and gates: why a held note sustains

Underneath the four stages is a mechanism worth understanding, because it explains behaviour the ADSR controls alone do not.

Pressing a key sends two different signals, not one.

  • A trigger — a momentary event at the instant of the keypress. Its only job is to tell the envelope generators to begin. It happens once and is over.
  • A gate — a signal that stays open for exactly as long as the key is held down, and closes when it is released.

The envelope runs attack and then decay on the trigger. It then holds at the sustain level for as long as the gate is open. When the gate closes, release begins.

So the gate is the answer to a question that otherwise has no answer: what decides how long the sustain stage lasts? Nothing in the envelope does. The player does, by holding the key, and the gate is how that information reaches the circuit.

Two practical consequences follow:

  • A note released during the attack never reaches full level. On most instruments the envelope abandons the attack and releases from wherever it had got to, so short notes on a slow-attack patch are quiet as well as short. Some designs complete the attack first regardless. Finding out which yours does takes ten seconds and explains a whole category of surprise.
  • Legato playing may not retrigger. Many synths distinguish between a new note played after everything is released and one played while another key is still down. In single-trigger or legato mode the second note changes the pitch without restarting the envelope, so it inherits the first note's stage — which is what makes a legato line sound connected rather than re-articulated.

Where envelopes go

A classic subtractive synth has two envelope generators, and their destinations are conventional:

  1. The amplifier envelope, shaping loudness over time. This one is never optional — the amplifier is the last stage in the audio path, and without something telling it to open there is no sound at all.
  2. The filter envelope, shaping timbre over time by moving the cutoff. Covered in the previous lesson, and the reason most patches sound like an instrument rather than a tone.

Instruments with more than two make the extras available as general-purpose modulation. The most useful third destination is pitch, and it is worth knowing one specific trick with it.

Route an envelope to pitch with a small amount and a very fast decay — a few tens of milliseconds — and the pitch drops briefly at the onset of every note. Too fast to hear as a change of note, it registers instead as a percussive attack transient. That is the click on a synthesised kick drum and the thump on a synth bass, and almost nothing else produces it convincingly.

What the numbers mean

Envelope times are usually shown as unlabelled knob positions, which leaves beginners with no calibration at all. Rough figures worth carrying:

  • Under 5 ms — perceived as instant. Anything percussive, plucked or struck.
  • 10 to 50 ms — a fast but audible onset. Brass, and anything meant to feel articulated rather than switched on.
  • 100 to 300 ms — a clear swell. Bowed strings, breathy leads.
  • 500 ms to several seconds — a pad arriving in its own time.

For decays and releases, 100 to 300 ms reads as a short tail, 500 ms to 1.5 s as a natural instrumental decay, and beyond 2 s as something deliberately lingering. Long releases on a polyphonic patch are also the fastest way to run out of voices, since every released note holds one until it finishes.

The mistake almost everyone makes once

Sustain is at maximum. You turn up decay and nothing happens. You turn it up more and still nothing happens, and you conclude the control is broken.

It is not. Decay describes the fall from the peak down to the sustain level. If sustain is already at maximum then there is no distance to fall, and decay has nothing to do regardless of its setting.

Decay only becomes audible once sustain is below full. That single relationship — decay is meaningless without headroom beneath it — is the most common confusion about ADSR envelopes, and it also explains the reverse case: on a plucked patch with sustain at zero, decay is the only control that matters and it single-handedly determines the character.

Envelopes go anywhere

The two conventional destinations are conventional, not compulsory. An envelope is a control signal like any other, and on an instrument with a modulation matrix it can be pointed at anything:

  • Pan — a slow envelope moving a sound across the field over the course of a note.
  • Pulse width — the harmonic content changing over the note, from an envelope rather than an LFO, so it happens once rather than cyclically.
  • LFO depth — vibrato that fades in by itself, an alternative to the LFO's own delay control.
  • Oscillator level — one oscillator fading in behind another, so the timbre changes as the note develops.
  • Effect send — a note that becomes progressively wetter as it decays.

A useful way to think about the difference between the two families: an envelope happens once per note, an LFO happens continuously. When you want something to change over the life of a note, you want an envelope, whatever the parameter is.

More than four stages

ADSR is a convention, not a law, and instruments extend it. The common extension is DAHDSR:

  • Delay — a wait after the note begins before the envelope starts at all. Useful for a layer that should arrive late, or a vibrato that should not be present on the attack.
  • Hold — a period at full level after the attack, before decay begins. It allows a shape ADSR cannot describe: full for a set time, then falling, regardless of how long the key is held.

Also common: AD envelopes with no sustain or release, used for percussion and for modulation that should always be a fixed shape; and looping envelopes, which repeat their attack and decay for as long as the gate is open — at which point an envelope has effectively become an LFO with a custom waveform, which is another instance of the control-signal idea from the first lesson.

Curves

A stage described only by its duration leaves a question open: what path does it take from one level to the other?

Analog envelopes are exponential, because they are produced by capacitors charging and discharging, and that is what capacitors do. The value moves fast at first and progressively slower as it approaches its target.

This turns out to match how the ear works, which is a convenient accident rather than a design decision. A linear decay — falling by the same amount every millisecond — sounds unnaturally abrupt at the end, because a linear fall in amplitude is not a linear fall in perceived loudness. Anything decaying naturally in the physical world decays exponentially.

Digital instruments can do either and usually offer a curve control. The practical guidance: exponential for anything imitating a physical decay, linear for a controlled fade or a modulation shape you want to be predictable.

Velocity, and making a patch respond

An envelope with fixed settings produces an identical note however it is played, which is the second-clearest giveaway of a programmed sound after a static filter.

The fix is velocity — how hard the key was struck — routed to envelope amounts. Two routings do most of the work, and they should usually both be present:

  • Velocity to the amplitude envelope's level. Play harder, get louder. Obvious and insufficient on its own.
  • Velocity to the filter envelope's amount. Play harder, get brighter. This is the one that matters, because it is what every acoustic instrument does — hitting something harder puts more energy into its high harmonics, not just more energy overall.

A related control worth finding is envelope tracking or time scaling, which shortens envelope times as you play higher up the keyboard. It exists because real instruments behave that way: a high piano note decays in a fraction of the time a low one takes, and the same holds across most struck and plucked instruments. Scaling envelope times with pitch reproduces the relationship, and it is one of the more effective realism adjustments available for the effort involved.

The two envelopes want different settings

A patch has an amplitude envelope and a filter envelope, and the commonest programming error after leaving attack at zero is giving them the same shape.

They are describing different physical things. Amplitude describes how much energy the sound has; the filter envelope describes how that energy is distributed across the spectrum. In almost every real instrument those two do not track each other.

The general pattern, and it holds surprisingly widely:

  • The filter envelope is usually faster than the amplitude envelope. A struck or plucked sound loses its high harmonics well before it loses its overall level, because high-frequency energy dissipates first. So a piano note is dull long before it is quiet — and a patch where brightness and loudness fall together sounds synthetic even when neither envelope is wrong on its own.
  • The filter envelope usually has a lower sustain. The note settles into a darker steady state while the amplitude holds.
  • The filter envelope's attack is often slightly slower. Brass in particular gets loud fractionally before it gets bright, and that small lag is most of what makes a brass patch convincing.

A quick diagnostic for a patch that sounds nearly right and slightly plastic: shorten the filter envelope's decay and drop its sustain, leaving the amplitude envelope alone. It fixes more patches than any other single adjustment.

Retriggering, and monophonic note priority

On a monophonic patch there is one voice and a decision to make whenever a second key is pressed while the first is held.

Note priority decides which note wins: the highest, the lowest, or the most recent. Classic instruments differ, and it is not a trivial detail — lowest-note priority makes a bass line behave one way under a trill and highest-note priority behaves another. Most modern instruments offer the choice.

Retrigger mode decides whether the envelopes restart. In multi-trigger they restart on every keypress, so every note is articulated. In single-trigger or legato mode they do not restart if a key was already down, so overlapping notes glide into one another with no new attack — which, combined with legato-only glide, is what makes a monophonic lead expressive under the fingers rather than merely monophonic.

Shapes worth knowing by heart

Most recognisable patches are one of a small number of envelope archetypes applied to different waveforms. Learning them as shapes rather than as numbers makes programming much faster.

  • Organ — attack 0, decay 0, sustain full, release 0. The envelope is effectively switched off: full level immediately, held while the key is down, gone when it is not. Every other shape is a departure from this.
  • Plucked or struck — attack 0, decay 300 to 800 ms, sustain 0, release short. The note begins instantly and falls away by itself while the key is still held. Sustain at zero is the essential part, and it makes the decay time the entire character.
  • Percussive — the same with a much shorter decay, 50 to 150 ms.
  • Pad — attack 500 ms to several seconds, decay moderate, sustain high, release long. Slow to arrive, slow to leave.
  • Bowed or blown — attack 100 to 300 ms, sustain high, release short. The note takes real time to speak and then stops promptly when the bow leaves the string.
  • Brass — a fast but not instant attack, around 40 to 80 ms, high sustain, and crucially a filter envelope with a slight overshoot: brass instruments get brighter a moment after they get loud, and reproducing that lag is what separates a convincing brass patch from an approximate one.

The single most common beginner error is worth naming: setting attack to zero on everything. It is the correct value for a great many sounds and the wrong one for anything meant to breathe, and a patch where nothing anywhere takes time to arrive sounds mechanical for a reason that is hard to identify unless you know to look for it.

Studio Rule

Sustain is a level. Everything else in an ADSR is a time. Half of all envelope confusion is that one asymmetry.

What to practice

  • Set attack, decay and release to zero with sustain full. That is an organ — the envelope is doing nothing, and every other shape is a departure from it.
  • Set sustain to zero and vary decay alone. You now have every plucked and struck instrument that exists, distinguished only by that one number.
  • Play a note and release it during the attack phase. Whether the sound reaches full level or stops where it was tells you how your synth handles gates, and instruments differ.
  • Route an envelope to pitch with a tiny amount and a very fast decay. That is the click on a synth kick, and almost nothing else produces it.
  • Take a real instrument recording and try to describe its envelope in ADSR terms before building it. Doing this a few times is what makes patches sound played rather than programmed.
Paid Mentor Access
Ask About This Lesson

Students pay for getting unstuck: ask a concept question, routing issue, DAW confusion, or mix decision tied to this lesson.

0
Credits
Unlock direct answers

Free readers can learn from the public Q&A archive. Paid students can ask their own lesson-specific questions and get mentor replies.

Uses 1 credit.
Question saved — a mentor will post a reply here once it's answered.
Answered Questions