5 S=54272 10 FORL=STOS+24:POKEL,0:NEXT 20 POKES+5,88:POKES+6,195 30 POKES+24,15 40 READHF,LF,DR 50 IFHF<0THENEND 60 POKES+1,HF:POKES,LF 70 POKES+4,33 80 FORT=1TODR:NEXT 90 POKES+4,32:FORT=1TO50:NEXT 100 GOTO40 110 DATA25,177,250,28,214,250 120 DATA25,177,250,25,177,250 130 DATA25,177,125,28,214,125 140 DATA32,94,750,25,177,250 150 DATA28,214,250,19,63,250 160 DATA19,63,250,19,63,250 170 DATA21,154,63,24,63,63 180 DATA25,177,250,24,63,125 190 DATA19,63,250,-1,-1,-1
Registers 5 and 6 define the ADSR for voice 1. The ATTACK is the high nybble of register 5. Nybble is half a byte, in other words the lower 4 or higher 4 on/off locations (bits) in each register. DECAY is the low nybble. You can pick any number 0 through 15 for ATTACK, multiply it by 16 and add to any number 0 through 15 for DECAY. The values that correspond to these numbers are listed below.
SUSTAIN level is the high nybble of register 6. It can be 0 through 15. It defines the proportion of the peak volume that the SUSTAIN level will be. RELEASE rate is the low nybble of register 6.
| This page has been created by Sami Rautiainen. | |
| Read the small print. | Last updated February 10, 2002. |