adsr

adsr · modulation · schema v1

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

A classic gate-driven envelope generator: a held gate runs the level up to peak over the attack time, falls to the sustain level over the decay time, holds there for as long as the gate stays high, then falls back to zero over the release time when the gate drops. It outputs a unipolar 0..1 control signal (env) plus its inverse (env_inv = 1 - env) for ducking; patch it 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 rise from 0 to its peak (1.0) after the gate goes high — 1 ms at the bottom up to 10 s at the top, on a log fader so most of the travel lives in the short, snappy times.
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 fader. Has no audible effect if sustain is already at 1.0 (nothing to decay to).
3SThe level the envelope holds at for as long as the gate stays high, after attack and decay complete — 0 (no sustain, decays all the way to silence) up to 1.0 (holds at full peak); linear fader.
4RHow long the envelope takes to fall from wherever it currently is back to 0 once the gate goes low — 1 ms to 10 s, log fader.

inputs

idcablewhat it does
gategateThe note signal that drives the whole envelope: a rising edge (gate goes high) starts the attack stage, then it 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. 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
attackcvCV that modulates the attack-time fader: a -1..+1 signal sweeps the attack symmetrically in log time around your fader setting (±1 multiplies/divides the time by 100x), so an LFO here covers two log decades of attack speed centered on the knob (clamped to the 1 ms..10 s range).
control voltage (CV); modulates attack (multiplicative ≈ octaves — ±1 CV spans the param’s log range)
decaycvCV that modulates the decay-time fader the same way — a -1..+1 signal scales decay symmetrically in log time (±1 = 100x faster/slower) around your fader setting, 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, so the signal pushes the held level up or down by up to half the range around your fader setting (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 fader — a -1..+1 signal scales release symmetrically in log time (±1 = 100x faster/slower) around your fader setting, 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 to 1 at the attack peak, holding at the sustain level while gated, then falling 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