DSP envelopes: Difference between revisions
From SNESdev Wiki
Jump to navigationJump to search
Rainwarrior (talk | contribs) (linking ADSR/GAIN) |
Rainwarrior (talk | contribs) (some explanation) |
||
Line 1: | Line 1: | ||
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: | |||
* [[S-SMP#ADSR|ADSR]] | |||
* [[S-SMP#GAIN|GAIN]] | |||
== ADSR Envelope Timings == | == ADSR Envelope Timings == | ||
See: [[S-SMP#ADSR|S-SMP ADSR]] | See: [[S-SMP#ADSR|S-SMP ADSR]] | ||
* Attack is the time from 0 to full. | |||
* Decay is the time from full to sustain level. | |||
* Release is the time from full to 0. | |||
{| | {| |
Revision as of 06:58, 5 October 2022
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 Envelope Timings
See: S-SMP ADSR
- Attack is the time from 0 to full.
- Decay is the time from full to sustain level.
- Release is the time from full 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 full volume (or the reverse).
GAIN | |||||||
---|---|---|---|---|---|---|---|
Decrease Linear | Decrease Exponential | Increase Linear | Increase Bent | ||||
V | Time (ms) | V | Time (ms) | V | Time (ms) | V | Time (ms) |
$80 | Infinite | $A0 | Infinite | $C0 | Infinite | $E0 | Infinite |
$81 | 4100 | $A1 | 38000 | $C1 | 4100 | $E1 | 7200 |
$82 | 3100 | $A2 | 28000 | $C2 | 3100 | $E2 | 5400 |
$83 | 2600 | $A3 | 24000 | $C3 | 2600 | $E3 | 4600 |
$84 | 2000 | $A4 | 19000 | $C4 | 2000 | $E4 | 3500 |
$85 | 1500 | $A5 | 14000 | $C5 | 1500 | $E5 | 2600 |
$86 | 1300 | $A6 | 12000 | $C6 | 1300 | $E6 | 2300 |
$87 | 1000 | $A7 | 9400 | $C7 | 1000 | $E7 | 1800 |
$88 | 770 | $A8 | 7100 | $C8 | 770 | $E8 | 1300 |
$89 | 640 | $A9 | 5900 | $C9 | 640 | $E9 | 1100 |
$8A | 510 | $AA | 4700 | $CA | 510 | $EA | 900 |
$8B | 380 | $AB | 3500 | $CB | 380 | $EB | 670 |
$8C | 320 | $AC | 2900 | $CC | 320 | $EC | 560 |
$8D | 260 | $AD | 2400 | $CD | 260 | $ED | 450 |
$8E | 190 | $AE | 1800 | $CE | 190 | $EE | 340 |
$8F | 160 | $AF | 1500 | $CF | 160 | $EF | 280 |
$90 | 130 | $B0 | 1200 | $D0 | 130 | $F0 | 220 |
$91 | 96 | $B1 | 880 | $D1 | 96 | $F1 | 170 |
$92 | 80 | $B2 | 740 | $D2 | 80 | $F2 | 140 |
$93 | 64 | $B3 | 590 | $D3 | 64 | $F3 | 110 |
$94 | 48 | $B4 | 440 | $D4 | 48 | $F4 | 84 |
$95 | 40 | $B5 | 370 | $D5 | 40 | $F5 | 70 |
$96 | 32 | $B6 | 290 | $D6 | 32 | $F6 | 56 |
$97 | 24 | $B7 | 220 | $D7 | 24 | $F7 | 42 |
$98 | 20 | $B8 | 180 | $D8 | 20 | $F8 | 35 |
$99 | 16 | $B9 | 150 | $D9 | 16 | $F9 | 28 |
$9A | 12 | $BA | 110 | $DA | 12 | $FA | 21 |
$9B | 10 | $BB | 92 | $DB | 10 | $FB | 18 |
$9C | 8 | $BC | 74 | $DC | 8 | $FC | 14 |
$9D | 6 | $DD | 55 | $BD | 6 | $FD | 11 |
$9E | 4 | $BE | 37 | $DE | 4 | $FE | 7 |
$9F | 2 | $BF | 18 | $DF | 2 | $FF | 3.5 |