Programming Hints


Atari Sounds Tutorial

Jerry White

This program was designed to help you discover some of the amazing sounds of Atari. You will enjoy experimenting with this program and learn at the same time. Here's how it works:

We will use two FOR-NEXT loops to alter the volume and pitch variables of the SOUND command. You will be prompted to type the required data. The program will then execute using your data and you will hear the sound you created. Here is sample data for you to use to get the feel of the program. Respond to the prompts with Dist 10, Pitch 20, L1 from 15, L1 to 0, L1 step -0.5, L2 from 3, L2 to 0, L2 step -1. Notice how the sound seems to vibrate as it fades. If you want to hear it again, just hit the option key.

You may want to use that sound in a program you write. At this point you will notice a Basic subroutine is displayed near the top of the screen. Make note of it and any other interesting sounds you come up with. Start a library of subroutines. When you're ready to try a new sound, hit the START key.

There are a few other useful routines in this program you may want to study. Lines 12 and 14 will show you how to use random color. You will find extensive error trapping of input routines. The loop from line 410 to 440 shows how to make use of the OPTION and START keys. To see if the SELECT key has been pressed, PEEK at 53279 and see if it equals 5.

When you type in line 340, type those messages using inverse video. The routine from line 300 to line 380 will cause these messages to flash. To further dress up your display, I suggest you also use inverse video for the messages at lines 10, 130, and 6000.

After you've used and studied this program for a while, you will begin to realize that the variety of possible sounds is almost endless. Now consider this. You have been using only one of the four voices available. The four voices can be used at the same time. You control the volume, pitch, and distortion of each voice. Take it away, imagination!

Listing. Sounds program

Download (Saved BASIC)
Download / View (Listed BASIC)


Return to Table of Contents | Previous Section | Next Section