The sound starts when the key is depressed, a process called ‘key on’.
The sound has an attack, a strong primary decay, followed by a slow
secondary decay. The sound continues this secondary decay until the key
is released, a process called ‘key off’. The sound then begins a rapid final
decay, representing for example a piano note after the key has been
released and the damper has come down on the strings.
The envelope is represented by the above amplitudes and angles, used
in the above diagram are:
Thanks MAXIM for the above excerpts:
https://www.smspower.org/maxim/Documents/YM2612
TL
Total level, the highest amplitude of the waveform.
AR
Attack rate, the angle of initial amplitude increase. This can be made
very steep if desired. The problem with slow attack rates is that if the
notes are short, the release (called ‘key off’) occurs before the note has
reached a reasonable level.
DR
The angle of initial amplitude decrease.
SL
The amplitude at which the slower amplitude decrease starts.
SR
The angle of secondary amplitude decrease. This will continue
indefinitely unless ‘key off’ occurs.
RR
The final angle of amplitude decrease, after ‘key off’.