Jump to content
IGNORED

How to Play a Simple Note with Atari BASIC


Recommended Posts

Hi,

 

How does one go about playing just one note in Atari BASIC?

 

On the TI-99/4A's BASIC, the command to play a single note is:

 

CALL SOUND(1000,440,2)

 

where...

"1000" indicates the duration of the note in milliseconds (from 1 to 4.25 seconds)

"440" is the tone level in Hz, and

"2" is the volume of the tone.

 

I also have to realize that on the Atari 8-bit machines the sounds and tones are in descending numbers rather than ascending. So, what would I enter to play a 60 Hz tone (mains hum)?

 

Thank you,

 

 

 

Ben

Link to comment
Share on other sites

I also want to know if the kind of tone I want to generate would involve the use of PEEK and POKE. The tone numbers from lowest to highest are given as 0-255 in descending order (255 being lowest and 0 being highest).

 

So, again, here is a list of sounds I would like to generate on Atari BASIC:

*Lawn mower - gasoline

*Lawn mower - electric

 

Thank you again,

 

 

 

Ben

Link to comment
Share on other sites

For first try: SOUND 0,255,12,6

 

for second: SOUND 0,132,12,2

 

and turn it off by SOUND 0,0,0,0.

Thank you!

Quick explanation - 1st # is voice (0-3 is acceptable), 2nd is frequency (0-255), 3rd is distortion/noise (0-15 is range, IIRC 8 and 12 are pure but it has been a few years), 4th is volume (0-15 range).

  • Like 1
Link to comment
Share on other sites

For first try: SOUND 0,255,12,6

 

for second: SOUND 0,132,12,2

 

and turn it off by SOUND 0,0,0,0.

Thank you!

Quick explanation - 1st # is voice (0-3 is acceptable), 2nd is frequency (0-255), 3rd is distortion/noise (0-15 is range, IIRC 8 and 12 are pure but it has been a few years), 4th is volume (0-15 range).

The sound can also be turned off by typing END when you're done running the program. And SOUND can also be abbreviated to "SO."

 

~Ben

Link to comment
Share on other sites

For first try: SOUND 0,255,12,6

 

for second: SOUND 0,132,12,2

 

and turn it off by SOUND 0,0,0,0.

 

Sometimes I have noticed the sound doesn't cut cleanly off when you do SOUND 0,0,0,0, there's like a snippet of white noise that lasts a fraction of a second ... so you should do this:

 

When you use SOUND 0,132,12,2 .... cut off the sound by using SOUND 0,132,12,0 thereby keeping your frequency and timbre values the same.

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...