Defines an ADSR envelope slot.
Syntax
Envelope id, attack, decay, sustain, release
Description
ENVELOPE defines how a generated instrument changes volume over the life of a note. This is what makes a sound feel plucked, struck, held, or faded instead of simply turning on and off.
Attack is how long the sound takes to rise from silence. Decay is how long it takes to fall from the attack peak to the sustain level. Sustain is the level held while the sound continues. Release is how long the sound takes to fade out at the end.
Like WAVE, ENVELOPE stores a definition in a numbered slot. INSTRUMENT combines a waveform slot and an envelope slot into something NOTE and PLAY can use.
Example
envelope 1, 0.01, 0.10, 0.50, 0.20
wave 1, 0
instrument 1, 1, 1
Notes
- Short attack and release values make percussive sounds. Longer values make softer fades.
See also