11.07.2015 Views

Here - 1000 BiT

Here - 1000 BiT

Here - 1000 BiT

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

REGISTER ADDRESSES Base address is 54272Add these register addresses to the base address:.RegisterV O 1 C e1 2 3contentsLOHIPulse lowPulse highWaveformAttack-DecaySustain-Release012345678910111213141516171819200 to 2550 to 2550 to 2550tol516, 32, 64, 9616*(0 to 15) + (0 to 15)16*(0 to 15) + (0 to 15)Volume (Loudness) 24 0tol5ATTACK-DECAY-SUSTAIN-RELEASESome registers are split into two uses.ATTACK and DECAY share one register. Why don't they trample each other's feet?Well, ATTACK stays in the attic, DECAY in the cellar. (Meaning, multiply the ATTACKnumber by 16, then add on the DECAY number.)Likewise,SUSTAIN and RELEASE share another register.Add16 INPUT "ATTACK-DECAY ";A,D17 INPUT "SUSTAIN ";S18 INPUT "RELEASE ";R20 POKE C+5.1B*A+D:POKE C+6.1B*S+R80 FOR T=1 TO D*.5:NEXTT:REM ATTACK.DECAY.SUSTAIN TIME92 FORT=1 TO D*.3:NEXTT:REM RELEASE TIMESave, then run.Now you can play the same tune sound with different instruments.Try these combinations: AD S R2200990099151223700150Try other combinations. Change lines 70 and 90 to have other waveforms (see page :::::in the SOUND EFFECTS lesson) and try them with different ADSR values.167

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!