Quick little bit of silliness, inspired by the awkward little grand piano minigame/toy in that spooky mansion in Final Fantasy VII.
Use Z to toggle right hand, X to toggle higher chords/notes, arrow keys to play a chord or note.
Question: the thing I'd like to do with this is check to see if a sound is already playing on a given channel before I play another, so that e.g. btnp() doesn't keep retriggering a given note or chord every 4 frames if the player holds the button down instead of tapping. I'm guessing I'd have to peek() at a specific bit of memory, but I have no idea where!
stat(16)-stat(19) show what pattern is playing on each channel, or -1 if empty. stat(20)-stat(24) show which note index (counting 0 to 32) in the pattern is currently playing. That should get you started, you could check for n=16,19 if stat(n)==0 then don't play pattern 0 or something.
[Please log in to post a comment]