DSP envelopes

The ENVX value of each S-SMP DSP voice is driven by either an ADSR envelope, or a gain control. This gives an additional way to automatically shape the volume of the voice over time, aside from its VOL registers.

The ADSR describes a 4 stage envelope:
 * Attack begins at key-on, rising from 0 to 127 over a chosen amount of time.
 * Decay lowers from 127 to a chosen sustain level.
 * Sustain is the volume level reached after the decay concludes.
 * Release begins at key-off, lowering to 0 with an exponential decay.

See:
 * ADSR
 * GAIN

ADSR Envelope Timings
See: S-SMP ADSR


 * Attack is the time from 0 to 127.
 * Decay is the time from 127 to sustain level.
 * Release is the time from 127 to 0.

Gain Timings
See: S-SMP GAIN

The odd linear gain rates are equivalent to the attack envelope rates (except for the fastest entry). The exponential decrease gain is equivalent to the release envelope.

This table gives times taken between 0 volume and 127 (or the reverse).