11.07.2015 Views

Here - 1000 BiT

Here - 1000 BiT

Here - 1000 BiT

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

INSTRUCTOR NOTES 19SOUND EFFECTSJThe 6581 Sound Interface Device (SID) chip in the C-64 produces sound and music. This Qlesson introduces some features of the chip which are useful for making sound effects.Musical applications are covered in a later lesson. \^jThe SID chip is controlled by POKEing numbers into its registers. The chip is versatile ^but fussy to program.Sound is sent to the TV speaker as part of the composite signal. If you use a color ^jmonitor instead, consult the C-64 manual to see the pin-out for sending the sound signalto an amplifier and speaker. \^jThe chip can produce up to three independent voices or sounds at the same time. The ^pitch of each voice is set by POKEing two bytes. This allows very precise intonation, afeature lacking in many other home computers. For example, you can experiment withthe various temperaments of the musical scale.^There are four voices for the wave form of each voice, producing different "timbres" for ^Jthe voices: flute, banjo, etc. One of the choices is "white noise" which is very useful forproducing sound effects (drums, gunfire, thunder, wind, waves, etc.). ^The loudness of the total sound output is set by one POKE, and each voice can beswitched into a programmable filter which modifies its harmonic content, further altering \^jthe timbre.Each voice has a controllable pattern in loudness from start to end. Four numberscontrol the note shape: two for its start (the "attack" followed by a "release") and one ^each for its loudness as it is held (the "sustain" value) and the rapidity with which it ,,decays after turning it off (its "decay"). These ADSR parameters are fully described inthe music lesson.The length of the note is controlled by a delay loop you write into the program, rather Othan by the SID chip. That is, you must start the note with a POKE, then go into atiming loop, and finally stop the note with one or two more POKEs.^jQUESTIONS:^1. What things must you POKE to get a sound? ^2. How do you turn off all the voices at once?3. Why must you be careful of the box number you POKE?4. What number gives the loudest sound?o108

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

Saved successfully!

Ooh no, something went wrong!