+atari2600land Posted June 7, 2006 Share Posted June 7, 2006 How do you make songs in Batari Basic? Is there a lesson or thread for this yet, cuz I couldn't find any on this forum. I know how to read and write music if that helps. I can play the piano really good by ear, too. Quote Link to comment Share on other sites More sharing options...
+batari Posted June 7, 2006 Share Posted June 7, 2006 How do you make songs in Batari Basic? Is there a lesson or thread for this yet, cuz I couldn't find any on this forum. I know how to read and write music if that helps. I can play the piano really good by ear, too. http://www.alienbill.com/2600/basic/music/ Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted June 7, 2006 Author Share Posted June 7, 2006 Do I really have to copy that whole program in order to play a song in my program? Quote Link to comment Share on other sites More sharing options...
+Atarius Maximus Posted June 7, 2006 Share Posted June 7, 2006 Do I really have to copy that whole program in order to play a song in my program? If you want to use that example then yes, you do. There may be other methods of incorporating music into bB programs, but for now it's the only example I know of. It works really well, although I've had a hard time modifying the song in my Jumper demo game. Making something that sounds good is going to take hours of work. I've earned a great deal of respect for all the atari audio programmers out there. Steve Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted June 7, 2006 Author Share Posted June 7, 2006 I put the example code on that page in batari basic: dim musicPointer=a dim musicTimer=b dim tempaudv=t rem VOLUME DOWN AND SET CHANNELS AUDV0=0 AUDC0=6 rem INITIALIZE POINTERS AND TIMERS musicPointer=$FF musicTimer=0 startLoop rem TIME TO UPDATE NOTE? if musicTimer = 0 then gosub changeMusicNote musicTimer = musicTimer - 1 drawscreen goto startLoop changeMusicNote musicPointer = musicPointer + 1 AUDF0 = musicData[musicPointer] tempaudv = 8 if musicData[musicPointer] = $FF then tempaudv = 0 AUDV0 = tempaudv musicPointer = musicPointer + 1 musicTimer = musicData[musicPointer] rem value is (2 * #_OF_NOTES) - 1 if musicPointer > 69 then musicPointer = #-1 return data musicData 24,30,27,30,30,30,27,30,24,28,-1,2,24,28,-1,2,24,60 27,28,-1,2,27,28,-1,2,27,60,24,30,20,28,-1,2,20,60 24,30,27,30,30,30,27,30,24,28,-1,2,24,28,-1,2,24,28,-1,2 24,30,27,28,-1,2,27,30,24,30,27,30,30,120 end compiled it, and it said it didn't know what musicPointer was! Quote Link to comment Share on other sites More sharing options...
+batari Posted June 7, 2006 Share Posted June 7, 2006 I put the example code on that page in batari basic: dim musicPointer=a compiled it, and it said it didn't know what musicPointer was! That's because the line above isn't properly indented. Quote Link to comment Share on other sites More sharing options...
+atari2600land Posted June 7, 2006 Author Share Posted June 7, 2006 Now it doesn't know what musicData is. Geez, am I really this clueless? Quote Link to comment Share on other sites More sharing options...
kisrael Posted June 8, 2006 Share Posted June 8, 2006 When you get this kind of error, use your editor to "find" the string in question and then see if it's there, see if it's indented properly, etc.... I wrote this music engine a longish while back. I think I didn't go further with it because someone pointed out that I could have saved a lot of ROM by use one byte to hold both note length and frequency, so I kind of got discouraged and didn't follow up on some of my grand ambitions for it Quote Link to comment Share on other sites More sharing options...
kisrael Posted June 8, 2006 Share Posted June 8, 2006 Heh, wow, I had forgotten how much work I had put into that tutorial! It's actually not half bad if I do say so myself. Quote Link to comment Share on other sites More sharing options...
vdub_bobby Posted June 8, 2006 Share Posted June 8, 2006 Making something that sounds good is going to take hours of work. I've earned a great deal of respect for all the atari audio programmers out there. See some of the entries in my blog and Tommy's blog for some great helps. And yes, it is a lot of work to get stuff that sounds good. Well, sometimes you stumble onto something simple that sounds great, but usually it takes a lot of work. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.