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.
Ah, excellent, that'll probably suffice. I'll take a look and see if I can get what I want out of that, thanks!
Is it me or this simulator was designed to play Some Things Last a Long Time by Daniel Johnston?
[Please log in to post a comment]