Log In  


Cart [#12162#] | Copy | Code | 2015-08-01 | Link

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!

P#12163 2015-08-01 15:57 ( Edited 2015-08-12 17:32)


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.

P#12166 2015-08-01 17:58


Ah, excellent, that'll probably suffice. I'll take a look and see if I can get what I want out of that, thanks!

P#12167 2015-08-01 18:08


P#12599 2015-08-12 16:47



P#12600 2015-08-12 16:49



P#12601 2015-08-12 17:32

Log in to post a comment


New User | Account Help
:: New User
About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2018-11-21 09:31 | 0.173s | 1835k | Q:22