Jump to content
IGNORED

First attempts at writing music in bB


thegoldenband

Recommended Posts

I finally got the Batari Basic compiler up and running on my computer this Thanksgiving -- great stuff! After writing a few very crude programs, I delved into the sound modules, and have written a few little tunes as my first attempts at music for the Atari 2600. Here's what I've come up with. It's all fairly simple, but was fun to make!

 

maintheme_final.bas.bin

 

This one's fairly active, and I can imagine using it for a title screen, boss fight, or something similar.

 

newtheme2_final.bas.bin

 

This one's probably my favorite so far. To me, it suggests caves, spooky mansions, or something underground. Would be good for anything that involves the player sneaking around, or some kind of suspense.

 

airthemenew_final.bas.bin

 

I asked my girlfriend for a cue, and she suggested "something in the clouds". This is the result.

 

underwater_final.bas.bin

 

And here's the underwater scene. Ideally, the arpeggiated pattern would happen a couple times on its own before the other part comes in, but I'm not that sophisticated a programmer yet!

 

melody2_final.bas.bin

 

This was the first one I wrote, and could be used for an invincibility theme or something similar.

 

Big thanks to the folks behind Batari Basic, the tutorials, and especially to Kisrael for the "do re bB" guide found here -- I made heavy use of the JoustPong code linked there, in putting together my little tunes.

 

If anyone actually wants to use any of these (!?), let me know! (Pardon the not-always-perfectly-descriptive attachment titles, by the way.)

Link to comment
Share on other sites

I like them all, but especially Underwater and Airtheme. Stuff I try to do with bB always ends up sounding liking early 90s breakbeat or drum n bass stripped down and converted. Your songs actually sound like vintage arcade themes. Yeah, I would definately use them, and I'm pretty sure I'm not the only one around here with limited musical talents.

Link to comment
Share on other sites

Wow, great tunes, thanks for posting them!

 

One thing that's noticeably absent from most Atari 2600 game is music. Many homebrew games have a catchy title theme (and a few have in-game music), but it's definitely not easy for most people to compose music, much less PROGRAM said music for the 2600. I'm sure you'll have people taking up your offer to use your tunes in the their games. :)

 

..Al

Link to comment
Share on other sites

Thanks for the kind words, guys! I'd obviously be more than pleased if someone wants to use my stuff, especially in a project that makes it to cart form -- "Atari 2600 music programmer for commercially released games" would be a fun thing to put on my musical resume.

 

(I'm a composer by trade, inasmuch as I'm working on my Ph.D. in it -- though the music I'm writing for my degree sounds pretty different from these tunes, to say the least!)

Edited by thegoldenband
Link to comment
Share on other sites

I want to put the underwater song as the title screen to GoSub 2. PM sent.

And replied! I hope you like the "delay" version -- one of the things I respect a lot about Paul Slocum's work is the way he uses techniques like that to create the illusion of depth, reverb, and greater polyphony.

 

@ MausGames: Let me see what I can do. Now that Thanksgiving break is over I'll probably have to rein things in for a bit, but I want to study a few tracks that use beats and percussion sounds, and see what I can steal be inspired by. The code I'm using doesn't really allow for note-by-note volume management, so I have to figure out how I want to handle that...

Edited by thegoldenband
Link to comment
Share on other sites

Thanks for the kind words, guys! I'd obviously be more than pleased if someone wants to use my stuff, especially in a project that makes it to cart form -- "Atari 2600 music programmer for commercially released games" would be a fun thing to put on my musical resume.

 

Cool! :) So, then, you won't mind releasing the source code, too? *hint hint* :P (pretty please?)

 

(I'm a composer by trade, inasmuch as I'm working on my Ph.D. in it -- though the music I'm writing for my degree sounds pretty different from these tunes, to say the least!)

 

Oh, boy... you may want to take that back! You are going to be a VERY popular person around here!... :cool: I hope your wife and family are very understanding of all the time you'll be spending fulfilling programming requests at atariage! ;) Free time? Forget it! Not anymore! You're all ours, now!! LOL! :D

 

Thanks,

 

Mike

Edited by lord_mike
Link to comment
Share on other sites

Cool! :) So, then, you won't mind releasing the source code, too? *hint hint* :P (pretty please?)

Sure! Did you have a specific one in mind? They all use basically the same engine adapted from JoustPong, and the GoSub 2 thread has my .bas file for "underwater" in it. Otherwise it's pretty much all in the data files...

 

Oh, boy... you may want to take that back! You are going to be a VERY popular person around here!... :cool: I hope your wife and family are very understanding of all the time you'll be spending fulfilling programming requests at atariage! ;) Free time? Forget it! Not anymore! You're all ours, now!! LOL! :D

Oh dear!

Edited by thegoldenband
Link to comment
Share on other sites

  • 9 months later...

Here's what I do:

 

i have data code for the notes, and another data code for the length. Thus, my code ends up looking like this:

 b=b+1
if b>title_screen_t_length[c] then b=0 : c=c+1 : d=d+1
if c>33 then c=0 : d=0
AUDV0=6 : AUDC0=12 : AUDF0=title_screen_treble[d]

This is from a song that has 34 notes. I don't know if this takes up more code than the example posted in the website (probably), but at least I know how it works.

Edited by atari2600land
Link to comment
Share on other sites

  • 2 weeks later...

I didn't see these replies until just now -- thanks for the kind words! I use the same basic engine for all my tunes, based on Kisrael's code linked towards the start of the thread. Here's the source for the "air theme":

 

airthemenew_final.bas

 

The whole thing is a lot simpler than I would have thought -- if I understand correctly, all 2600 music is taking place in intervals of 1/60 of a second, so in some sense your basic tempo map is already set up for you. The trickiest thing is doing the split-second channel switches needed for drum effects, but remarkably, you can "steal" the first 1/60 second of a bass note or other sound for a hi-hat hit, and it's basically not perceptible at all. Here's my latest tune, in which I do some of those quick-switches:

 

sept13theme_13.bas

 

Note that I'm NOT a programmer, so the source is sloppy, undocumented/uncommented, and basically a disaster. With some time and effort, it could be made dramatically more elegant -- for instance, in my one-channel "boxing theme" (in the K.O. Cruiser thread), I was able to reuse the same data for different iterations of a loop.

 

BTW, I've started a new thread for my Atari 2600 tunes in the homebrew forum.

Edited by thegoldenband
Link to comment
Share on other sites

HA!

I'm so out of this scene right now :-( but I kind of want to get back in ....

 

I had actually forgotten "do re bB" (terrible memory) but... wow, that's pretty cool of me :-)

 

Just reading Random Terrain's manual, I see how amazing bB has become. I think next month I should jump back in and then do my next GloriousTrainwreck as a 2600 game...

Link to comment
Share on other sites

  • 4 weeks later...

In response to you not knowing how to do movement with music at the same time..

 

Wouldn't you have your main loop gosub a music loop. In there you'd have a variable incremented to let the loop know what musical note it's played and what

it needs to play left.. maybe this could be done with data statements somehow. If the music is choppy or too slow I guess you could call the music loop more

than once during your main loop.

 

I wonder how music would run if you stuck it in VBLANK? Then, every time you call drawscreen it'll run the music also.

 

I don't know if my idea will get smooth sounds like "Pitfall II" or anything, though, as I've not tested it and the current game I am working on has no

background music, just some quick sounds.

Link to comment
Share on other sites

  • 3 years later...

This was more relevant before VisualbB had a music and sound editor. I can't imagine going back to customizing your own music engine and hand coding notes.

 

Maybe a discussion on improving VisualbBs music capabilities or at least being able to import MIDI files would be a step forward.

Link to comment
Share on other sites

This was more relevant before VisualbB had a music and sound editor. I can't imagine going back to customizing your own music engine and hand coding notes.

 

Maybe a discussion on improving VisualbBs music capabilities or at least being able to import MIDI files would be a step forward.

 

Thanks for your contribution. Since I don't own any hardware that can run VisualbB (my main computer is a PPC Mac), then for my working purposes, that IDE isn't really "relevant", so to speak.

 

BTW an updated version of the music engine I use can be found in the thread linked earlier. It was improved by Random Terrain to allow for more flexibility and ease of use.

 

As for importing MIDI files, I question whether that'd be all that useful. IMHO, the TIA's capabilities are so idiosyncratic that adapting pre-existing tunes for it usually doesn't work out that well, though there are exceptions (I was pretty happy with my Castlevania and Ballblazer adaptations). I personally don't have any trouble hand-coding the notes, and I like that kind of fine-grained control, but certainly tracker software could come in handy for quickly modeling a tune.

Link to comment
Share on other sites

This was more relevant before VisualbB had a music and sound editor. I can't imagine going back to customizing your own music engine and hand coding notes.

 

Maybe a discussion on improving VisualbBs music capabilities or at least being able to import MIDI files would be a step forward.

 

Thanks for your contribution. Since I don't own any hardware that can run VisualbB (my main computer is a PPC Mac), then for my working purposes, that IDE isn't really "relevant", so to speak.

 

BTW an updated version of the music engine I use can be found in the thread linked earlier. It was improved by Random Terrain to allow for more flexibility and ease of use.

 

As for importing MIDI files, I question whether that'd be all that useful. IMHO, the TIA's capabilities are so idiosyncratic that adapting pre-existing tunes for it usually doesn't work out that well, though there are exceptions (I was pretty happy with my Castlevania and Ballblazer adaptations). I personally don't have any trouble hand-coding the notes, and I like that kind of fine-grained control, but certainly tracker software could come in handy for quickly modeling a tune.

 

I'd venture to say not many people continue to develop on PowerPC Macs using Batari BASIC. I guess my contribution was for the bB user now as opposed to 2008. You never mentioned your setup elsewhere in this thread. MIDI is useful in that it's a well documented and well supported standard. There are many, many MIDI composition tools and only a few who can hand code 2600 frequencies.

 

Are you any good at software development? I'd love to see VisualbB and it's music editor ported to mono

http://www.mono-project.com/Mono:PowerPC

Edited by theloon
Link to comment
Share on other sites

Since I don't own any hardware that can run VisualbB (my main computer is a PPC Mac), then for my working purposes, that IDE isn't really "relevant", so to speak.

 

Seems like there are a growing number of bB users who can't use Visual batari Basic and the Music and Sound Editor, so I brought back this page in case it might be helpful:

 

The bB Music and Sound Data Creation Toy

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