Javascript Piano Keyboard

Joe Liang

Share Follow @1000mileworld

I made this piano keyboard in Javascript based on the dynamically generated synthetic keyboard made by Keith William Horwood. I extended the number of keys available to 4 octaves, set new key bindings, and applied some stylistic changes. To keep things simple, I removed the option of switching to different instrument sounds and just kept piano. You can find a tutorial I've written for this project posted on Free Code Camp.

What makes this keyboard interesting is the fact that Javascript dynamically generates the appropriate sound when the user presses a key and the code does not load any external audio files.

Blog | My Projects