Sounder: Using SOUND on the 2068

Authors

Publication

Pub Details

Date

Pages

See all articles from SUM v4 n7

A COMMENT

When writing an article I always try to do something which will encourage others to try their hand at learning to program for themself. While SOUNDER is a working program, it is open to improvement and I hope some of you will do just that. You may want to allow for larger files, add new routines, or anything that you think will make it better. How about adding a Catalog file?

SOME PARTICULARS

The program starts out by going to a subroutine which draws the logo for the opening screen at line 580. After this it draws the working screen at line 25. Then comes the routine for adding the screen commands at line 95.

Next comes the main part of the program starting at line 145. Here we have a part of the program which keeps track of the command keys that are pressed by the User. [If for example the User presses the “8” key, a jump is made to a Subroutine which keeps track of seeing if the key is still pressed and starts the amount (Amt) going upward in value. If the key is released, then the program is RETURNed to where it came from. The same thing happens in reverse for the countdown routine.

All other routines are sensed from the keyboard in the same manner as the above. It is which key has been pressed that determines which sub-routine the program goes to. These Subs are labled according to their function. For example: GOSUB tape makes the program do the TAPE routine at line 350.

Use the 8 & 5 keys to change the value of each register for the particular sound you wish to make. Press six to move to the next register and then follow the menu at the bottom of the screen to sound off, Retain, or SAVE the values.

THE MEMORY

The memory which is used to store the values for the Registers is broken into two parts; one holds the register numbers (at 59000), and the other saves the values which go into the registers (at 60000). These locations were picked because they are high in memory. Why are they split into two groups? I felt it was easier from a programing view to do so. It allows one variable to count for both locations rather than having them at one location and having to alternate the values.

TAPE IT

Once the TAPE option has been chosen, the two memory locations which hold the data for the sound program(s) is altered and put into one location for ease of handling to tape. The two locations are PEEKED and then stored in location 58000. The data is saved in alternate fashion; first the register number and then a value of that given register.

GET A SOUND

When a request for a sound is made from the keyboard, a prompt asks for either ALL or LAST entry. Here is an area which may be altered to suit your needs. The routine begins at line 270. Either choice is routed to the proper routine. One will allow only the last 13 entries to be called up. The other will call all the memory up to a given limit which you may set. Default is 20 complete register pairs (13*20).

WHY DIDN’T I?

Why didn’t I make it more elaborate? The first thing a program should be is User friendly. It should not burden the User with to many commands which are hard to remember. The more the program grows (as a rule), the harder it gets to use easily. Number two, it was left this way with hopes that some of you would taylor it to your liking. Have I changed it much since the beginning? You bet! All ideas may be improved upon with enough thinking!

SOME THOUGHTS

How about sound routines that may be entered into a question and answer type program which would produce some wierd noises for the wrong or right answers? Looking for that “spacey” sound? Try some of the basic sounds given in your manual and go from there. Have you tried immitating a cricket? How about a frog? Sounds are of unlimited supply, it’s up to you.

ATTACK AND FALL

Well ok, it’s decay, not fall. Sounds which you hear every day are produced with these two terms. Attack is simply how fast a sound reaches it maximum peak level. Decay is how long it takes it to drop back off. Now as for the cricket, it has (I think) about an even attack and decay range. That gives us approximently a SAWTOOTH wave form. See page 193 of your manual: Fig 10. Now if the sound were very fast in rising (attack) and slower in falling off (decay), then fig 8 would fill the bill.

AND THERE

You have it. These are some basic ideas to help you in getting started. The rest is up to you. Try it out and have some fun.

Products

 

Media

 

Image Gallery

Source Code

Scroll to Top