Another common envelope type is [adsr~], which provides controls for timing (in milliseconds) of the attack, decay and release portions of an envelope, as well as the sustain gain.
The [adsr~] must be triggered both on and off with an audio-rate gate signal (1 turns it on, 0 triggers the release).