Jump to content
IGNORED

Music Maker


atari2600land

Recommended Posts

Upset that Grover's Music Maker was never released, I decided to make my own little program in Batari BASIC. This is different than Grover's. This is more like a piano. See, there's this little guy that runs across 8 different keys, and when you press fire, he makes the key play, and once you depress fire, the note stops playing. At least, that's how I want it to go anyway. Here's what I have so far:

2 set kernel_options pfcolors
100 for a=0 to 10 : pfhline 0 a 31 off : next
105 for b=0 to 7 : pfhline 0 b 4 on : next
110 COLUBK=128 
120 player0:
 %00110110
 %00100100
 %00111100
 %01111110
 %10111101
 %00100100
 %00111100
end
122 pfcolors:
 14
 14
 14
 14
 14
 14
 14
 14
 0
 0
 0
end
125 x=45 : c=0 : d=0
137 if c=1 && d=0 then AUDV0=6 : AUDC0=12 : AUDF0=9
 if c=1 && d=1 then AUDV0=6 : AUDC0=12 : AUDF0=11
 if c=1 && d=2 then AUDV0=6 : AUDC0=12 : AUDF0=13
138 player0x=x : player0y=y : COLUPF=14 : COLUP0=32

142 if d=0 then goto 144

144 drawscreen : y=8 : d=0
 if c=0 && joy0fire then c=1 : goto 137
 goto 137

With this, once you press fire, the note keeps on playing whether you keep pressing fire or not. The question is: where do I put "if c=1 && joy0fire then c=0"? And if c=0 that means AUDV0=0, too. d=0 means do, d=1 means ti, d=2 means la, etc.

Link to comment
Share on other sites

I've decided to just start all over again from scratch and not even try to make any sort of code (past what I've just posted) until I can get this question answered: How can I get player0 to go from key to key? I've tried dozens of ways and nothing seems to work. I figure y=8 is on the first key (line), and go by incriments of 8 down until key 8 (which would be 64). This is way harder than I thought it would be. :?

musicmaker.bas

Link to comment
Share on other sites

I've decided to just start all over again from scratch and not even try to make any sort of code (past what I've just posted) until I can get this question answered: How can I get player0 to go from key to key? I've tried dozens of ways and nothing seems to work. I figure y=8 is on the first key (line), and go by incriments of 8 down until key 8 (which would be 64). This is way harder than I thought it would be. :?

That should have worked (it did for me), but it would also depend on where you incremented or decremented y in the loop. However, I moved the keys down 1 row, and used player1 to add the black keys, then added 2 data arrays to control the x and y position of player0, so player0 can jump from the white keys to the black keys. You can add another data array for the tones. I also made player0 brighter to help it show up better.

 

MR

musicmaker2.bas

Link to comment
Share on other sites

Without seeing SeaGtGruff's wonderful example (which I may have to use), I came up with this crude little thing. It doesn't work perfect, but what projects of mine do? :) Notice the faint electronic "ehhhhhhh" sound when you play a note. Is there any way to get rid of that?

P.S. Note that these are just temporary sounds.

musicmaker.bas

Edited by atari2600land
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...