adsr

adsr · modulation

Gate-triggered attack-decay-sustain-release envelope. Outputs CV.

A classic gate-driven envelope generator: a held gate ramps the level from 0 up to peak (1.0) over the attack time, falls to the sustain level over the decay time, holds there for as long as the gate stays high, then fades back to zero over the release time when the gate drops. All the timed stages are straight linear ramps, and if the gate falls early (mid-attack or mid-decay) the level freezes where it is and the release fades from there. It outputs a unipolar 0..1 control signal (env) plus its inverse (env_inv = 1 - env) for ducking; patch either into any CV input (a VCA's gain, a filter's cutoff) to shape that destination over the life of each note.

the faceplate

Numbered control face for adsr
#controlwhat it does
1AHow long the envelope takes to ramp from 0 to its peak (1.0) after the gate goes high — 1 ms up to 10 s on a log-scaled control, so most of the travel lives in the short, snappy times. The first stage of the contour: short reads as a click or pluck, long as a slow swell.
2DHow long the envelope takes to fall from the peak down to the sustain level once the attack finishes — 1 ms to 10 s, log-scaled. Has no audible effect if sustain is at 1.0 (there is nothing to decay to).
3SThe level the envelope holds for as long as the gate stays high, after attack and decay complete — 0 (no hold, decays all the way to silence) up to 1.0 (holds at full peak). A level, not a time — the only linear control of the four stages.
4RHow long the envelope takes to fade from wherever it currently is back to 0 once the gate goes low — 1 ms to 10 s, log-scaled. The note's tail; it applies even when the gate drops mid-attack.

inputs

idcablewhat it does
gategateThe note signal that drives the whole envelope: a rising edge (gate goes high) starts the attack stage, the level then decays to and holds at the sustain level WHILE the gate stays high (this input is level-sensitive, not just edge-triggered), and the falling edge (gate goes low) starts the release stage back to 0 — from wherever the level currently is, even mid-attack. Re-gating is a hard retrigger: a new rising edge snaps the output back to 0 and ramps the attack again from zero, it does NOT continue from the level it was at.
gate / trigger; gate — acts while the level is high (reacts to both edges)
attackcvCV that modulates the attack time: a -1..+1 signal scales it symmetrically in log time around your set value — ±1 multiplies or divides the time by 100x (two decades either way, clamped to the 1 ms..10 s range) — so an LFO here sweeps the attack from snap to swell centered on the control.
control voltage (CV); modulates attack (multiplicative ≈ octaves — ±1 CV spans the param’s log range)
decaycvCV that modulates the decay time the same way — a -1..+1 signal scales it symmetrically in log time (±1 = 100x faster or slower, two decades either way) around your set value, clamped to 1 ms..10 s.
control voltage (CV); modulates decay (multiplicative ≈ octaves — ±1 CV spans the param’s log range)
sustaincvCV that displaces the sustain level — linear, since the param is already a native 0..1 level: ±1 pushes the held level up or down by up to half the range (±0.5) around your set value, clamped to 0..1.
control voltage (CV); modulates sustain (additive offset — ±1 CV sweeps the full range, centered on the knob)
releasecvCV that modulates the release time — a -1..+1 signal scales it symmetrically in log time (±1 = 100x faster or slower, two decades either way) around your set value, clamped to 1 ms..10 s.
control voltage (CV); modulates release (multiplicative ≈ octaves — ±1 CV spans the param’s log range)

outputs

idcablewhat it does
envcvThe envelope itself as a unipolar 0..1 control signal — 0 at rest, ramping linearly to 1 at the attack peak, holding at the sustain level while gated, then fading to 0 on release. Patch into a VCA gain, filter cutoff, or any CV destination to shape it over each note.
control voltage (CV)
env_invcvThe inverted envelope, 1 - env: it sits at 1 at rest and dips toward 0 as the envelope rises (full env peak = 0 out). Patch into a VCA or filter to duck / reverse-modulate that destination on every note, sidechain-style.
control voltage (CV)

params

idlabelrangedefaultcurve
attackA0.001..10s0.005log
decayD0.001..10s0.1log
sustainS0..10.7linear
releaseR0.001..10s0.3log

source

adsr.ts on GitHub.

Generated from packages/web/src/lib/{audio,video}/module-registry.ts · repo