Log In  

Cart #12162 | 2015-08-01 | Code ▽ | Embed ▽ | No License
50

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 21: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 ( Edited 2015-08-01 21: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 ( Edited 2015-08-01 22:08)
6

P#12599 2015-08-12 16:47 ( Edited 2015-08-12 20:47)

Fantastic!

P#12600 2015-08-12 16:49 ( Edited 2015-08-12 20:49)

Hilarious!

P#12601 2015-08-12 17:32 ( Edited 2015-08-12 21:32)

Is it me or this simulator was designed to play Some Things Last a Long Time by Daniel Johnston?

P#98383 2021-10-08 15:03

right down left up do it slowly

P#124837 2023-01-25 16:09

Fantastic!!!

P#129643 2023-05-11 16:38

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 12:05:27 | 0.011s | Q:25