Piano Help Please!


I’m making a piano, and some things are missing that are important to making it work that I would like to ask.

  1. While coding the piano keys, I realized that there were only playSound and stopAllSounds in the Sound functions. There appears to be no stopSound to stop only a specific sound. For example, I press a key that plays C3, and then I press another key to press C# / Db. When I release one of the keys, both keys stop. This issue can make or break my piano, and I think adding something like stopSound() would be super helpful.

  2. It seems I cannot use things like “tab” to trigger an action. Maybe I just don’t know how to do it, but I tried “if(key === ‘tab’)” and the tab did nothing. I’m pretty sure this is the same with things like delete, caps lock, shift, return, etc. I also found that “`” doesn’t work, and I want to get some clarification on this.

  3. This is not anything to do with the piano itself, but I believe this is a bug. If you are not in the code editor and you delete a script, the code will pop up in front of the warning of whether you want to delete the script or not. After you confirm, the editor re-appears.

Tank u!



Hey there!

  1. Agreed! We definitely need a stopSound() function for individual sounds. I’ll take a look at adding that in the next update!

  2. Tab seems to work for me, but, the browser is also receiving that key event, so the canvas becomes unfocused and other keys stop working. Not sure how to fix this one - might be a browser limitation. As for the ` key, that seems to be working fine for me - anything else weird happening while trying to use tilde?

  3. I think @Luxapodular fixed this bug in the latest update!



Thanks, I’ll look over it again just to be sure.