JS1k Piano

This is an entry for the JS1k competition, to produce something interesting in 1k (or less) of JavaScript. This entry is a simple music generator, controlled by the keyboard in a manner similar to a piano - although the stylophone might be a better comparison, both in terms of sound fidelity and usability :-).

Important: This application uses web technologies which are not - as of September 2010 - supported by all browsers. Please see the compatibility table to see if your browser is one which provides the necessary functionality.

Sorry, but it looks like your browser doesn't have the necessary features to run this. We would advise trying Opera, Firefox or Safari instead.

Your browser reports itself as CCBot/1.0 (+http://www.commoncrawl.org/bot.html)

How to use this

Please be patient when you first start the application, as it has to create the sound waves for all the musical notes. This can take several seconds, depending on the speed of your browser, your computer, etc. The application will indicate when initialization is complete by displaying a "Ready" message.

Keys Q,W,E,R,T,Y,U and I play the white notes (starting from C), keys 2,3,5,6 and 7 play the black notes. (Apologies to international users with keyboard layouts such as AZERTY or QWERTZ.)

Play the piano