ADSR

From C64-Wiki
Jump to navigationJump to search
Stub This article is very short and not very detailed. Please help to improve it.

The abbreviation ADSR is used in sound synthesis and stands for Attack, Decay, Sustain and Release which defines the volume envelope for an oscillator (triangle, sawtooth, pulse, noise) which in turn forms the characteristic of a sound. With the right settings for the ADSR envelope it is possible to simulate musical instruments like piano, organ, trumpet, guitar, etc. or sound effects like shot, siren or explosion with the C64.

While attack, decay and release are times, sustain is a volume level. Attack, decay and release time depend on the status of the gate bit. The function of the gate bit roughly corresponds to pushing a key on a piano keyboard — gate on — and releasing the key — gate off. Each ADSR part can have a value between 0..15. A sustain level of 15 equates to the maximum volume. In this case is the decay time is irrelevant, because the sound volume won't change. The envelope of the C64 can be set with the BASIC command POKE (see SID, programming in BASIC).

What Description Gate bit
Attack Rise time to maximum volume. 1
Decay Fall off time to decrased volume at sustain level. 1
Sustain Volume level that is held while the gate bit is set. 1
Release Fade out time of the tone. 0
Value Attack Decay Release
0 2 ms 6 ms 6 ms
1 8 ms 24 ms 24 ms
2 16 ms 48 ms 48 ms
3 24 ms 72 ms 72 ms
4 38 ms 114 ms 114 ms
5 56 ms 168 ms 168 ms
6 68 ms 204 ms 204 ms
7 80 ms 240 ms 240 ms
8 100 ms 0.3 s 0.3 s
9 0.25 s 0.75 s 0.75 s
10 0.5 s 1.5 s 1.5 s
11 0.8 s 2.4 s 2.4 s
12 1 s 3 s 3 s
13 3 s 9 s 9 s
14 5 s 15 s 15 s
15 8 s 24 s 24 s

Please note that these values assume a clock rate of 1MHz, while in fact the clock rate of a C64 is either 985.248 kHz PAL or 1.022727 MHz NTSC.

Links[edit | edit source]

WP-W11.png Wikipedia: Synthesizer#ADSR_envelope