Jump to content
IGNORED

Simple pure tone Music playing


Recommended Posts

Some games mostly older one have some music playing the notes in pure tone in one or more channels. An example is Dark chambers that seem to play a two channel tune in the title screen. Compared to basic it would be someting like reading data statments and putting into a sound 0,data,10,10. In assembler it would be something like reading some .byte statements and putting into the  sound freq registers.  Is there some sort of player for this type atari music. Music that use the least amount memory possible. And is there some some sort of easy way to play a melody on the keyboard and then knowing what the equalent atari data would be to achieve the similar melody. 

Link to comment
Share on other sites

There are plenty solutions available for this. One popular is the pokey player, which comes also with an editor.  Then, for games some music engines have been designed, for example the advanced music system by Phillip Price (IIRC) which plays the tunes of the Tail of Beta Lyrae or Mr. Robot. For many games, it is just a custom player in the VBI that was created just for this particular purpose.

Link to comment
Share on other sites

Back in the day it was largely a case of custom a player usually unique to each game.

Often just reading values and storing them per VBlank maybe with some simple ADSR work and delay until the next note.

Some games use sound effects algorithms where a requested sound sequence has a value then the routine procedurally generates it as time goes on.

 

These days there's the likes of RMT that allow developing music in the Windows program then creating source and executable.

 

The irony of Basic is it can actually do some sound stuff faster than the VBlank interval but it's not very deterministic so not a great solution to do music other than simple 1-2 voice stuff.

Edited by Rybags
Link to comment
Share on other sites

2 hours ago, Grevle said:

Some games mostly older one have some music playing the notes in pure tone in one or more channels. An example is Dark chambers that seem to play a two channel tune in the title screen. Compared to basic it would be someting like reading data statments and putting into a sound 0,data,10,10. In assembler it would be something like reading some .byte statements and putting into the  sound freq registers.  Is there some sort of player for this type atari music. Music that use the least amount memory possible. And is there some some sort of easy way to play a melody on the keyboard and then knowing what the equalent atari data would be to achieve the similar melody. 

see about it - this should interest you:

 

 

 

and here is a ready library to use:

 

https://xxl.atari.pl/sfx-engine/

 

 

 

 

  • Like 2
Link to comment
Share on other sites

There is also this routine I have been using ... originally converted from the Atari 7800 Mrs. Pac Man but optimised for POKEY.

 

A few caveats:

 

You are limited to a single distortion per channel, per piece of music or SFX

You can either have the music play once, or repeat ...

Musical rests can be inserted through a MUTEMASK setting which is customizable (set any byte as a rest value)

 

Source code plus an example demo.  Hit start key to cycle through. 

 

Tips:  Each tune has a TUNExx and DURNxx table for frequency and duration.  There is a CHANNLTBL which has $00 through $03, plus a CTLVOLTBL used for setting distortion and volume ($0x through $Ax)

 

This routine will also play at the same speed in PAL as in NTSC

abbayes-sfx.asm abbayes-sfx.s abbayes-sfx.xex

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