ADSR

Plays an envelope that rises while its gate is on and falls back when it goes off.

Parameters

NameTypeDescription
ValueoutputFloatThe level of the envelope, between 0 and 1.
DoneoutputTriggerFires when the release has finished and the level is back at 0.
GateBoolHolds the envelope open for as long as it is on.
TriggerTriggerPlays the envelope once, as if the gate were held on for the trigger length.
Trigger LengthFloatHow many seconds the gate stays on after a trigger.
AttackFloatHow many seconds the level takes to rise to 1 after the gate goes on.
DecayFloatHow many seconds the level takes to fall from 1 to the sustain level.
SustainFloatThe level held for as long as the gate stays on, between 0 and 1.
ReleaseFloatHow many seconds the level takes to fall back to 0 after the gate goes off.
CurveEnumThe shape of each rise and fall. Linear moves at a steady pace, and Exponential moves fast at first and slows down towards the end.Choices: Linear, Exponential

The ADSR operator shapes a level over time, the way a synthesizer shapes a note. While the gate is on, the level rises to 1, falls to the sustain level and stays there. When the gate goes off, it falls back to 0. Connect a Beat to the trigger to give every beat a rise and fall of its own.

A gate or trigger that arrives while the envelope is still playing starts a new attack from the current level, so the level never jumps.

See also Beat, Ramp.

Keywords: envelope, attack, decay, sustain, release, gate, fade