BASIC SOUNDS

by Russ Walter


Atari's computer contains four voices; each voice can sing. So you can make the computer imitate a quartet.

The four voices are called 0, 1, 2, and 3. This program makes them sing:

10 SOUND 0,127,10,4
20 SOUND 1,101,10A
30 SOUND 2,84,10,4
40 SOUND 3,63,10,4
50 FOR I = 1 to 400: NEXT 1
60 SOUND 3,56,10,4
70 FOR I = 1 to 400: NEXT 1

Line 10 tells voice 0 to sing pitch 127 (which is "middle C"), using tone quality 10 (which is "pipe organ") and volume 4 (which is "mediumsoft"). Line 20 tells voice 1 to sing pitch 10 1 (which is "the E above middle C"). Line 30 tells voice 2 to sing pitch 84 (which is "the G above middle C"). Line 40 tells voice 3 to sing pitch 63 (which is "the C above middle C"). So line 10-40 make all four voices sing; you hear a chord. Line 50 makes the computer pause for 1 second; so you can hear the chord for 1 second.

Line 60 tells voice 3 to change its pitch to 56 (which is "the D above the C above middle C"); the other voices, unaffected, continue to sing C, E, and G. Line 70 makes the computer pause, so that you hear the new chord for 1 second.

PITCH

The pitch must be a number from 0 to 255, and cannot be a decimal. Here are some popular pitches:

255 is a deep bass note (it's "the C below middle C"; "the C in the bass clef")

127 is "middle C"

63 is a soprano note ("the C above middle C": "the C in the treble clef")

31 is a very high note ("the C above the treble clef")

15 is very, very high ("the C above the C above the treble clef")

7 is very, very, very high ("the C above the C above the C above the treble clef")

3 is very, very, very, very high ("a C at the edge of your range of hearing")

1 is very, very, very, very, very high ("a C that only your dog can hear")

0 is very, very, very, very, very, very high ("maybe not even your dog?")

To translate traditional music notation into computer pitches, use this chart:

(Note to musicians: to make full use of the Atari's range, I've tuned it slightly flat. For example, 127, which I'm calling "middle C", is slightly flatter than a piano's middle C; in fact, it's closer to the piano's B.)

TONE QUALITY

The tone quality must be 0, 2, 4, 6, 8, 10, 12, or 14. For most music, use 10. The 14 sounds almost the same as 10. The 12 is a buzz. The other tones are used for making the computer imitate guns, bombs, airplanes, trucks, motorcycles, and all the other evil joys of life.

VOLUME

The volume must be from 0 to 15. The 0 is silence; 1 is a barely audible whisper; 4 is soft and sweet and is what I recommend for most four-part harmony. The higher the volume, the more unpleasant distortion you'll notice - especially if you try harmony.

MY FAVORITE COMPOSITION

This program composes exciting music:

10 FOR I = 0 TO 255
20 SOUND 0,I,10,4
30 SOUND 1,255-I,10,4
40 SOUND 2,INT(RND(0)*256),10,4
50 NEXT I

Line 10 says that I increases. As I increases from 0 to 255, the pitch in line 20 goes from 0 to 255; the pitch in line 30 goes from 255 to 0; and the pitch in line 40 is random. So voice 0 goes from 0 (dogs only) to 255 (bass), which voice 1 goes from 255 (bass) to 0 (dogs only), and voice 2 sings random notes. Try it!