Skip to content

Envelope

ADSR envelope generator. Sample-accurate triggering inside an AudioWorklet — no main-thread latency between trigger and ramp-start.

Category: Control

envelope node on canvasenvelope inspector panel

Inputs

NameTypeDescription
triggercontrolOne-shot. Rising edge runs attack → decay → release (sustain stage is skipped).
gatecontrolHeld. Rising edge starts attack/decay/sustain; falling edge starts release.
attackcontrolAttack-time CV in seconds. Adds to the `attack` parameter.
decaycontrolDecay-time CV in seconds. Adds to the `decay` parameter.
sustaincontrolSustain-level CV. Adds to the `sustain` parameter.
releasecontrolRelease-time CV in seconds. Adds to the `release` parameter.

Outputs

NameTypeDescription
outcontrolEnvelope signal, 0–1.

Parameters

NameTypeDefaultRangeUnitDescription
curveenumlinearlinear, exponential, cosineSegment shape. Linear is straight ramps; exponential mimics analog R/C circuits; cosine has zero slope at endpoints (smoothest, fewest clicks).
attacknumber0.010.001–5 (log)sAttack time in seconds (gate-on → peak).
decaynumber0.10.001–5 (log)sDecay time in seconds (peak → sustain level).
sustainnumber0.70–1Sustain level held while gate is high (0–1).
releasenumber0.30.001–10 (log)sRelease time in seconds (gate-off → 0).