Classic Computer Magazine Archive HI-RES VOL. 1, NO. 1 / NOVEMBER 1983 / PAGE 32

Zounds Sounds

by Pat Henderson

Sound, sound, sound! That's all you ever hear about when the Atari is mentioned (except the phenomenal graphics). The Atari creates the best sounds of any computer around, but what good are they if you can't access them easily. Sure, you can write a 2K program with "billions and billions" of sound statements that run up and down a tone or distortion level. You might even be able to write a program to use the joysticks to change the tone, but how are you going to change the tone, the distortion level, access all four sound channels at once, and even turn a voice on and off?

Well, my friend, listen up. The following Basic program is a Sound Editor. With it you can move any voice (0-3) through the entire scale of tones the Atari produces (0-255), and also through all the distortion levels (0-14 in multiples of two).

With a little practice, you'll be producing sounds like a race car roaring along a Daytona straight away, or, maybe, the space shuttle Columbia, launching right outside your window. Best of all, you can control it from your joystick.

You'll need a few odds and ends, including: 1) Some knowledge of Basic programming, 2) one joystick, 3) and ten fingers. If you qualify in these categories, then you are on your way to becoming "Mozart of 1983."

Shuttles and cars

Once the program is running, you'll need a few pointers before you can use it effectively. The colorful numerals that float around the screen are roving reminders of the tone and distortion effects on each voice number (0-3). (I'll call these voice/numbers hereafter.) The tones are represented horizontally, the distortion vertically.

The active voice/number on screen will appear to roll in color. To change from this voice to another, press the trigger on your joystick. To shut that voice off, press the spacebar. Press it again to turn the voice back on. If you want to change the tone, move the joystick left or right. Moving it right will cause the tones to fall lower and lower; moving it to the left will cause the tones to increase in pitch. Moving the joystick up and down changes the distortion level. By moving it up, the distortion decreases; move it down, and the distortion increases. Any distortion level greater than 14 is the same as the distortion level minus 14 or a multiple of 14. In other words let's say the program indicates you have a distortion level of 22; you actually have a distortion of 8 because 22-14 = 8. The bottom of the screen shows a table that tells you what voice is outputting what tone and distortion.

As you are typing the program consult Table 1 for a full line description. This will help you to write your own program.

The race car effect

To start using this program, try these few examples and experiments. You can create a race car sound effect by moving one voice/number to distortion level 6 and putting the tone level between 90 and 130. Try putting more than one voice in this area to get a muffled car sound, or even multiple race cars. By putting one voice/number on tone 0 and distortion 10, you can create a shuttle blast-off. Move the voice/number up the tones, and it sounds like the shuttle is actually launching outside your room.

One interesting sound effect is the result of putting all four voice/numbers on the same distortion level, but with different tones. Hold down the button and the space bar while pressing the joystick to the right or left. A strange mixture of sounds emerges.

Also, if you put certain voice/numbers in different places on the screen, but have them turned off, you create different sounds in other voices. This is a strange but useful feature that can add new dimension to your own programs.

If you want to crank the volume up, change the SOUND I,S(I),D(I),15. This last number can't exceed 15 or the result is an error on that line. Keep experimenting and soon you'll be creating your own original sound effects.

Line Description






Dimensions 6 arrays to hold values for each voice.
Puts you in Graphics Mode 0 and turns the screen black.
It also turns the cursor off and clears the keyboard scan.
This line tells the computer where to find the graphics for the voice/numbers.
This is done using player/missile graphics.
This line zeros the memory to be used for player/missile graphics.
This line stores the values for the colors of all the voice numbers.
Fourteen = White, 132 = Blue, 196 = Green and 64 - Red.
These are the values where the voices start.
This puts the word Voice on the bottom of the screen and
puts the colors into memory and puts the voice/numbers on the screen.
This draws the voice/numbers on the screen.
Data for the voice/number graphics.
Starts with voice/number 0.
Scans keyboard for space bar.
If space bar was hit and sound was on, turns sound off.
If space bar was hit and sound was off, turns sound on.
Updates the sound to current values, if sound is supposed to be on.
Moves the voice/number and scan joystick for position.
If the joystick was not moved it jumps to "Rolling Colors Routine" (lines 52-56).
jumps to "Variable Update Routine" (lines 49-51).
Changes color back to correct one; checks for pressed button.
If pressed, goes to next voice/number.
Checks joystick again.
If joystick is to the left, changes horizontal and tone variables.
If joystick is to the right, changes horizontal and tone variables.
If joystick is up, jumps to "Up Routine" (lines 35-41).
If joystick is down, jumps to "Down Routine" (lines 42-48).
Checks for upper and lower limits on variables.
Loops back to line 15 and starts over.
Moves voice/number up 3 lines and decrements distortion.
Moves voice/number down 3 lines and increments distortion.
Changes variables on the bottom of the screen.
Rolls colors through the current voice/number.

Table 1: A line description of the Sound Editor program.

Listing: ZSOUNDS.BAS Download