Here are the meanings of the values for ATTACK, DECAY, and RELEASE:
| VALUE | ATTACK RATE (TIME/CYCLE) | DECAY/RELEASE RATE (TIME/CYCLE) |
|---|---|---|
| 0 | 2 ms | 6 ms |
| 1 | 8 ms | 24 ms |
| 2 | 16 ms | 48 ms |
| 3 | 24 ms | 72 ms |
| 4 | 38 ms | 114 ms |
| 5 | 56 ms | 168 ms |
| 6 | 68 ms | 204 ms |
| 7 | 80 ms | 240 ms |
| 8 | 100 ms | 300 ms |
| 9 | 250 ms | 750 ms |
| 10 | 500 ms | 1.5 s |
| 11 | 800 ms | 2.4 s |
| 12 | 1 s | 3 s |
| 13 | 3 s | 9 s |
| 14 | 5 s | 15 s |
| 15 | 8 s | 24 s |
Here are a few sample settings to try in your example program. Try these and a few of your own. The variety of sounds you can produce is astounding! For a violin type sound, try changing line 20 to read:
20 POKES+5,88:POKES+6,89:REM A=5;D=8;S=5;R=9
Change the waveform to triangle and get a xylophone type sound by using these lines:
20 POKES+5,9:POKES+6,9:REM A=0;D=9;S=O;R=9 70 POKES+4,17 90 POKES+4,16:FORT=1TO50:NEXT
| This page has been created by Sami Rautiainen. | |
| Read the small print. | Last updated February 10, 2002. |