Jump to content
Sprybug

Developing some Batari Music & Sound Tools

Recommended Posts

Posted (edited)

Just wanted to let you know, I'm developing a new music engine for Zed, which I'll make available to anyone who wants to include it in their game.

 

It allows use of Patterns (Up to 16), so you can easily repeat sections of music (Save ROM Space!)

Each pattern can hold approximately 5 measures of music (4/4 Time)

Data for the measures is only inputted when there is something to spit out, which saves even more on ROM Space.

Ability to jump to other music patterns out of sequence.

Ability to loop a song.

A databank that sorts the Atari's musical scale to make it easier to input the data.

A special bank for drums and percussion

Ability to hold a note, a natural sustain decay, a slowed sustain decay, or cut a note.

 

And all this I was able to do using only 2 bytes of RAM and one extra bit!

It takes even less RAM (by 7 bits) than the standard way of doing music in your game via Batari!

 

A sequence pointer that is one byte, a pattern pointer that is one nibble, a volume control nibble, and a toggle bit for slow decay.

It does use some of the temp variables, and a few of my own variables I use as temp variables (I need them to last for the whole routine), so be sure to have a few extra bytes handy for those.

 

When I release it, I will also release a sheet that shows the values of the notes on a keyboard, along with the sequence values for note holds for 20,30, and 60 FPS games.  The notes will also include the best key signatures to use for your games, because of Atari's limited musical scale.

 

After this, I am going to start work on an actual Atari 2600 program where you can play around with the TIA to experiment on making new sound effects.

It will show you the values you are using in the interface, so you can write them down and be able to put them in your sound effect data sequences.

 

 

Now of course specs can change because I might have originally overlooked something, which knowing myself, is highly likely.  Like for example, right now, I'm wondering if I have to add even more bytes because of the simultaneous channels doing their own thing or not.  I just finished the program and yet have to take it for a spin, so I'll keep you posted.

 

 

Edited by Sprybug
  • Like 5
  • Thanks 3

Share this post


Link to post
Share on other sites

Yep, just as I expected!  I needed to have the decay set up for both channels, so have to add another nibble and byte for that, but still in total that's 2 bits less than the standard method!  Plus it's more compact and takes less ROM space for your music data, while implementing some nifty features.  Let's see if I can get this working.

Share this post


Link to post
Share on other sites
On 7/16/2019 at 10:24 AM, MemberAtarian said:

Soundz like a cool stuff. You begann working with ASM?

Actually, nope!  Still doing Batari.  Just figured out the whole nibble thing by reading the tutorials and trying it out.  I always try to squeeze the most bits I can out of this thing.  This means that other people who use Batari will be able to use this code and format in their own games to make it easier to add a soundtrack.  Now, of course it's not going to write the music for you, but if you know a little musical theory, this can go a long way.

The Sound effect maker, I'll be writing in DPC+ to take advantage of the higher resolution and multiple sprites.  You'll just have to write down the values it gives you on paper or something and then put them in a data statement for your sound effects.  I could release how I handle that too.  It's really simple actually.

Share this post


Link to post
Share on other sites

This is awesome, being sound has been an enigma for me. 

Share this post


Link to post
Share on other sites
9 hours ago, Sprybug said:

Actually, nope!  Still doing Batari.  Just figured out the whole nibble thing by reading the tutorials and trying it out.  I always try to squeeze the most bits I can out of this thing.  This means that other people who use Batari will be able to use this code and format in their own games to make it easier to add a soundtrack.  Now, of course it's not going to write the music for you, but if you know a little musical theory, this can go a long way.

The Sound effect maker, I'll be writing in DPC+ to take advantage of the higher resolution and multiple sprites.  You'll just have to write down the values it gives you on paper or something and then put them in a data statement for your sound effects.  I could release how I handle that too.  It's really simple actually.

I may continue my PyTari2600 project later, creating a new language, but it takes too much time. :D And on the other hand, I should create a working graphics kernel on my own, that's the only I thing I cannot do in ASM. :D

  • Like 1

Share this post


Link to post
Share on other sites

Currently developing the engine.  I decide to do some more tweaking, so I could have more control over the volume decay, which of course added a whole other byte (2 Nibs) because of the two channels.  Sure, it's now taking a touch more memory than the standard, but the features, ROM space saving space, and the easing of implementing music makes it worth it.  I will release a stand alone engine and a tutorial for it in the near future.

  • Like 1

Share this post


Link to post
Share on other sites

I think the visual bB music engine works.  This'll be a big step up though!  The main bottleneck has always been beginner friendly music editing tools for bB games.  Is that a part of this project?  Or, can we import MIDI tunes or something?

Share this post


Link to post
Share on other sites
On 7/23/2019 at 7:14 AM, Gemintronic said:

I think the visual bB music engine works.  This'll be a big step up though!  The main bottleneck has always been beginner friendly music editing tools for bB games.  Is that a part of this project?  Or, can we import MIDI tunes or something?

Would love to do that one day, and maybe after I finish Zed.  My focus is finishing Zed, although I am taking time to develop this "kit" just because it'll make it easier to make the other music for the other levels, and slim down the ROM Space it uses.  The music that plays at the "end credits" of Zed that you hear, takes about 3K of ROM Space.  With this system it'll take less space, because I can just have it repeat and jump to certain patterns with a pattern table that can hold 16 patterns, and not just have to have the data duplicated again in the standard engine method, which quickly eats up ROM space.

After Zed, I would love to make a MIDI cable device that could hook up through the Atari's Joystick port and then hook up the Midi in/out end to your keyboard.  Then have a cartridge you could plug in, to compose Music with your midi keyboard straight into the Atari.  Then you could use the 2nd joystick port to act as a serial interface with your PC'S USB so you can save the data to a file using a front end program that will run and capture  the data to save as a data file for the Atari 2600 cart, and a text file that you can copy and paste and use in the Batari BASIC music engine I am developing, but that's all a pipe dream.

  • Like 3

Share this post


Link to post
Share on other sites
5 hours ago, Sprybug said:

With this system it'll take less space, because I can just have it repeat and jump to certain patterns with a pattern table that can hold 16 patterns, and not just have to have the data duplicated again in the standard engine method, which quickly eats up ROM space.

 

I like that idea. 

  • Like 1

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