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.

AS THE NOTE GROWS OLDERWhen turned on, the note rises to full loudness. How long it takes to get there is controlledby the ATTACK number. Zero means a "click" start while 8 gives a very gradual start.After getting to full loudness, the note decays to its SUSTAIN loudness. How long ittakes to decay is controlled by the DECAY number. Of course, if the SUSTAIN number Sis 15, the note does not decay at all!The SUSTAIN number tells how loud (compared to the maximum loudness) the note willstay until turned off, 15 is loud, zero is off.When the note is turned off, it dies away to zero loudness in a time controlled by theRELEASE number. Line 92 in the program gives the note time to die away.Without line 92, the next note would start before the first died away. But if you do notstart another note (for example in a sound effect), you can do other computing while thesound continues to die away! A laser shot sound can slowly die away while the computermoves graphics around.<strong>Here</strong> are the times for ATTACK, DECAY and RELEASE:Number0123456789101112131415Attack2 ms8 ms16 ms24 ms38 ms56 ms68 ms80 ms100 ms250 ms500 ms800 msIs3s5s8sDecay andRelease6 ms24 ms48 ms72 ms114 ms168 ms204 ms240 ms300 ms750 ms1.5 s2.4 s3s9s15 s24 s"ms" means "millisecond" or a thousandth of a second. So 500 ms is a half a second.Assignment 29:1. Change the ROW YOUR BOAT program to play another tune.2. Change the ROW YOUR BOAT program to let the user pick the waveform.3. Write an ELECTRIC ORGAN program. Use the top row of the keyboard as the organkeys. Let the user pick stops of different kinds of sounds.168

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

Saved successfully!

Ooh no, something went wrong!