Producing Sound and Graphics:
SOUND, SETCOLOR, COLOR
Creating sound and graphics on some computers is very complicated,
but not on the ATARI 65XE. The SOUND command of ATARI BASIC,
combined with some simple programming techniques, is all you need.
Sound and graphics add new dimensions to your BASIC programs—
anything from arcade-game zaps and cracks, musical themes, and
songs to colorful graphic displays.
SOUNDING OFF
Your ATARI 65XE can play up to four sounds at one time. The four
sound registers, or voices, are numbered 0, 1, 2, and 3. To select the
first voice, you type SOUND 0; for the second, SOUND 1; for the third,
SOUND 2; and for the fourth, SOUND 3.
The SOUND command in ATARI BASIC controls four elements:
voice (0-3)
pitch (0-255)
distortion (0-14)
volume (0-15)
The pitch, or frequency, of the sound is determined by a number from
0 to 255, giving you a total of 256 frequencies from which to choose.
The pitch value is the second number in the SOUND command.
SOUND 1,50 specifies the second voice with a pitch of 50. Make sure
that the volume is turned up on your TV or monitor, then type
SOUND
1,50,0,8
Press . A great explosion, isn't it? To turn off the sound, you
just turn down the volume on your television, or type either of the
commands below and press :
END
SOUND
1,0,0,0
The purity, or distortion, of the sound is determined by any even
number between 0 and 14. In the SOUND command, the purity of the
sound is the third number. Try this:
SOUND
1,50,10,8
65