Jump to content

Recommended Posts

I wanted to start an open discussion on music programming with the Atari 800XL home computer. This topic is for sharing Atari basic source code for music and sound effects as well as learning how to program chiptunes on your Atari at home.

I hope here we can learn and experience more about programming in basic and help others write their own music projects with this classic system.

 

Rock on! \m/

  • Like 3

Share this post


Link to post
Share on other sites

For the last two weeks I've been tinkering and experimenting to try and create a sound program. So far I've been able to program one sound using a rudimentary restore program before plugging away the variables for duration, tone, distortion and volume onto a data line later on in the program. It looks something like this.

 

10 RESTORE 1000

20 READ DURATION:READ TONE:READ DISTORTION:READ VOLUME

30 SOUND 0,TONE,DISTORTION,VOLUME

40 IF DURATION=-1 THEN SOUND 0,0,0,0

40 Z=1 TO DURATION:NEXT Z

50 GOTO 20

1000 DATA (DURATION HERE),(TONE HERE),(DISTORTION HERE),(VOLUME HERE),...

 

EXAMPLE DATA STATEMENT:

1000 DATA 50,60,10,10,50,40,10,10,20,155,10,10,20,155,5,10,-1

(Note: I couldn't remember the values for specific tones but this should suffice as an example)

 

What I am trying to do is combine the four voices together by experimenting with different variations of this program, but I've been having many difficulties getting this to work. Any and all suggestions are welcome. I'll be sure to share the source code once I find something that works.

 

Unfortunately there aren't many books written solely to help people write music in Atari Basic but some books I have found helpful so far have been the "ATARI800XL Reference Guide" and "Inside Atari Basic" by Bill Carris. Also the lessons by Mikey Walters in the online magazine "We Are The Mutants" is a good step in the right direction to writing simple sound loops.

A link to the magazine article is below.

 

I contacted Mikey and he also provided me with additional links to books as well as magazines. Pm me if you would like the links to check out for yourself.

 

WE ARE THE MUTANTS: https://wearethemutants.com/2017/07/10/adventures-in-atari-basic-lesson-seven-music-and-mission-briefings/

  • Like 1

Share this post


Link to post
Share on other sites

There are BASIC replay routines for both Raster Music Tracker and Chaos Music Composer. There is also the Enhanced POKEY Player, which is designed for use with BASIC.

Share this post


Link to post
Share on other sites

There are BASIC replay routines for both Raster Music Tracker and Chaos Music Composer. There is also the Enhanced POKEY Player, which is designed for use with BASIC.

Could you give me a link to the basic source code for any of these? I'm trying to write the full code and save it to my atari's dos. I'm hoping to create a code that anyone can enter into their atari to use with their own system to make their own music. Any more info or links you can share would be greatly appreciated to help point others in the right direction as well.

Share this post


Link to post
Share on other sites

Could you give me a link to the basic source code for any of these? I'm trying to write the full code and save it to my atari's dos. I'm hoping to create a code that anyone can enter into their atari to use with their own system to make their own music. Any more info or links you can share would be greatly appreciated to help point others in the right direction as well.

 

Here's replay instructions for CMC (DEMO.BAS is on the program disk found here):

 

REPLAY ROUTINE

 

To use music in your own programs, you need to load both *.CMC, and *.REP files into the memory. Both are DOS-loadable files.

 

To start the music from BASIC, use:

USR (replay, song_nr, music_adr)

"replay" is the adress of replay-routine, "song_nr" is the number of the song (first is "1" etc.), and music_adr is the adress, where is the song itself (*.CMC file).

To stop the music use:

USR (replay)

 

Note that it's not possible to start the music twice - you must stop

it first! How to load the files into memory? An example is in the program

DEMO.BAS. (The subroutine BGET in this program gives the adress of

loading as the value of function USR.)

  • Like 1

Share this post


Link to post
Share on other sites

For the last two weeks I've been tinkering and experimenting to try and create a sound program. So far I've been able to program one sound using a rudimentary restore program before plugging away the variables for duration, tone, distortion and volume onto a data line later on in the program. It looks something like this.

 

10 RESTORE 1000

20 READ DURATION:READ TONE:READ DISTORTION:READ VOLUME

30 SOUND 0,TONE,DISTORTION,VOLUME

40 IF DURATION=-1 THEN SOUND 0,0,0,0

40 Z=1 TO DURATION:NEXT Z

50 GOTO 20

1000 DATA (DURATION HERE),(TONE HERE),(DISTORTION HERE),(VOLUME HERE),...

 

EXAMPLE DATA STATEMENT:

1000 DATA 50,60,10,10,50,40,10,10,20,155,10,10,20,155,5,10,-1

(Note: I couldn't remember the values for specific tones but this should suffice as an example)

 

What I am trying to do is combine the four voices together by experimenting with different variations of this program, but I've been having many difficulties getting this to work. Any and all suggestions are welcome. I'll be sure to share the source code once I find something that works.

 

Unfortunately there aren't many books written solely to help people write music in Atari Basic but some books I have found helpful so far have been the "ATARI800XL Reference Guide" and "Inside Atari Basic" by Bill Carris. Also the lessons by Mikey Walters in the online magazine "We Are The Mutants" is a good step in the right direction to writing simple sound loops.

A link to the magazine article is below.

 

I contacted Mikey and he also provided me with additional links to books as well as magazines. Pm me if you would like the links to check out for yourself.

 

WE ARE THE MUTANTS: https://wearethemutants.com/2017/07/10/adventures-in-atari-basic-lesson-seven-music-and-mission-briefings/

If you're wanting to combine 4 voices, you will need to not "hard code" the sound channel in line 30. You can choose to interleave the DATA statements anyway you choose, but you'll need data for each of the 4 voices.

 

Sorry if this is not the issue you were having.

Share this post


Link to post
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.

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...