Maybe we could do something like this (taken from
C64 sound programming)
Code:
ADSR Envelope Values
VALUE ATTACK RATE DECAY RATE RELEASE RATE
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 .3 sec .3 sec
9 .25 sec .75 sec .75 sec
10 .5 sec 1.5 sec 1.5 sec
11 .8 sec 2.4 sec 2.4 sec
12 1 sec 3 sec 3 sec
13 3 sec 9 sec 9 sec
14 5 sec 15 sec 15 sec
15 8 sec 24 sec 24 sec
so maybe the mnemonics could be like so:
Code:
0D 0X LL HH AD SR SNP Play PCM Sound for HHLL miliseconds at the tone specified in address pointed to by Register X, using the ADSR nibble values for attack, decay, sustain (volume), release respectively.
The AD SR values + milliseconds duration would build up the envelope prior to playing the tone...
I think this should be very easy to do, and not too complex...then lots of cool sounds would be possible!
What do you guys/gals think?
cheers,
Paul
Last edited by paul_nicholls; October 27th, 2011 at 00:45..