Jump to content

Photo

First attempts at writing music in bB


25 replies to this topic

#1 thegoldenband OFFLINE  

thegoldenband

    Quadrunner

  • 5,587 posts
  • Location:The Sapphire Galaxy

Posted Fri Nov 23, 2007 6:47 PM

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!

Attached File  maintheme_final.bas.bin   4KB   229 downloads

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

Attached File  newtheme2_final.bas.bin   4KB   219 downloads

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.

Attached File  airthemenew_final.bas.bin   4KB   234 downloads

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

Attached File  underwater_final.bas.bin   4KB   230 downloads

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!

Attached File  melody2_final.bas.bin   4KB   201 downloads

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

#2 MausGames OFFLINE  

MausGames

    Dragonstomper

  • 897 posts
  • Location:MO, USA

Posted Fri Nov 23, 2007 8:28 PM

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.

#3 Albert OFFLINE  

Albert

    Quadrunner

  • 35,379 posts

Posted Fri Nov 23, 2007 8:47 PM

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

#4 thegoldenband OFFLINE  

thegoldenband

    Quadrunner

  • Topic Starter
  • 5,587 posts
  • Location:The Sapphire Galaxy

Posted Fri Nov 23, 2007 8:59 PM

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, Fri Nov 23, 2007 9:00 PM.


#5 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 29,029 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Fri Nov 23, 2007 9:52 PM

I haven't used bB enough to figure out how you can have movement and sound at the same time (without everything stopping). Has anyone made a tutorial about that yet?

#6 MausGames OFFLINE  

MausGames

    Dragonstomper

  • 897 posts
  • Location:MO, USA

Posted Sat Nov 24, 2007 12:24 AM

Can you do anything more contemporary, maybe with a rhythm track?

#7 atari2600land OFFLINE  

atari2600land

    My favorite channel is Channel F.

  • 11,793 posts
  • It's groovy.
  • Location:Salem, Oregon

Posted Sun Nov 25, 2007 1:47 PM

Very nice work! I want to put them in GoSub 2, maybe make a little jukebox Easter egg or something. If only I could program music that well. Can I see the .bas file for these?

#8 atari2600land OFFLINE  

atari2600land

    My favorite channel is Channel F.

  • 11,793 posts
  • It's groovy.
  • Location:Salem, Oregon

Posted Mon Nov 26, 2007 9:43 AM

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

#9 thegoldenband OFFLINE  

thegoldenband

    Quadrunner

  • Topic Starter
  • 5,587 posts
  • Location:The Sapphire Galaxy

Posted Mon Nov 26, 2007 11:10 AM

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, Mon Nov 26, 2007 11:11 AM.


#10 lord_mike OFFLINE  

lord_mike

    Chopper Commander

  • 194 posts

Posted Mon Nov 26, 2007 4:46 PM

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, Mon Nov 26, 2007 5:16 PM.


#11 thegoldenband OFFLINE  

thegoldenband

    Quadrunner

  • Topic Starter
  • 5,587 posts
  • Location:The Sapphire Galaxy

Posted Tue Nov 27, 2007 4:08 PM

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, Tue Nov 27, 2007 4:08 PM.


#12 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Tue Sep 2, 2008 2:52 PM

Would you (or someone else) be able to show me some music code in BAS? I haven't yet attempted any sounds or music for lack of me finding any better documentation. I need to do a title screen music.

#13 Impaler_26 OFFLINE  

Impaler_26

    Cookie Meister

  • 2,684 posts
  • Braindead
  • Location:Hueco Mundo

Posted Tue Sep 2, 2008 2:59 PM

This should help you making musics with bB:

http://www.alienbill...00/basic/music/

#14 atari2600land OFFLINE  

atari2600land

    My favorite channel is Channel F.

  • 11,793 posts
  • It's groovy.
  • Location:Salem, Oregon

Posted Tue Sep 2, 2008 3:14 PM

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, Tue Sep 2, 2008 3:14 PM.


#15 iwan-iwanowitsch-goratschin OFFLINE  

iwan-iwanowitsch-goratschin

    Progressive Pornobär

  • 6,421 posts
  • You met me at a very strange time in my life!
  • Location:good old GERMANY

Posted Tue Sep 2, 2008 3:24 PM

Wow, the airtheme is cool! :cool:

Good work! :thumbsup:

#16 thegoldenband OFFLINE  

thegoldenband

    Quadrunner

  • Topic Starter
  • 5,587 posts
  • Location:The Sapphire Galaxy

Posted Sat Sep 13, 2008 11:57 PM

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":

Attached File  airthemenew_final.bas   2.14KB   178 downloads

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:

Attached File  sept13theme_13.bas   4.71KB   149 downloads

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, Sat Sep 13, 2008 11:59 PM.


#17 kisrael OFFLINE  

kisrael

    HMBL 2600 coder

  • 4,073 posts
  • Location:Boston Burbs, MA

Posted Fri Sep 19, 2008 9:28 AM

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

#18 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Fri Oct 17, 2008 11:36 AM

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.

#19 thegoldenband OFFLINE  

thegoldenband

    Quadrunner

  • Topic Starter
  • 5,587 posts
  • Location:The Sapphire Galaxy

Posted Sun May 6, 2012 9:00 PM

Threadbump to keep this one from getting archived. :D And to remind me that I need to get back into doing this!

#20 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,363 posts

Posted Mon May 7, 2012 7:45 AM

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.

#21 thegoldenband OFFLINE  

thegoldenband

    Quadrunner

  • Topic Starter
  • 5,587 posts
  • Location:The Sapphire Galaxy

Posted Mon May 7, 2012 12:53 PM

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.

#22 the.golden.ax OFFLINE  

the.golden.ax

    Quadrunner

  • 12,547 posts

Posted Mon May 7, 2012 1:12 PM

You should make a youtube of all of them.

#23 Gemintronic OFFLINE  

Gemintronic

    Jason S. - Lead Developer & CEO

  • 9,363 posts

Posted Mon May 7, 2012 2:44 PM

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-proj...om/Mono:PowerPC

Edited by theloon, Mon May 7, 2012 2:52 PM.


#24 Propane13 OFFLINE  

Propane13

    Stargunner

  • 1,649 posts
  • Location:Charleston, SC

Posted Mon May 7, 2012 2:49 PM

Agreed, a youtube vid would get more looks at the topic-- I personally would take a look myself, if there was one.

-John

#25 Random Terrain OFFLINE  

Random Terrain

    Visual batari Basic User

  • 29,029 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sun May 13, 2012 2:39 AM

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




0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users