I have been told in the past that the piano is a good instrument to learn in order to better understand music theory. And music theory, being Something That Exists, is very much something I would like to understand. So I figured I would teach myself how to play the piano. And what better way to teach oneself something than to create a program that teaches it to you instead?!
PianoPal is a virtual piano built in javascript using MIDI.js to produce the sounds (using the soundfonts found here). It accepts input via three methods:
- Keyboard (which computer keys correspond to which piano keys is displayed on the virtual keyboard)
- Mouse (you can click on the keys to produce sounds)
- MIDI device (using WebMidi.js to process MIDI device input)
PianoPal has three modes:
Self-Playing Mode (“Songs”)
This mode isn’t especially useful, but it’s kind of fun. Load a MIDI file into the program (or choose one of the pre-loaded ones) and watch the piano go! Watching the keys press down could potentially be useful for someone who learns visually, and to that end I’ve included the option to slow down the self-playing speed if you’d like (or to speed it up just for fun).
Practice Mode (“Drills”)
Choose whether you’d like to practice Notes, Chords, or Scales. Then you will be able to fine-tune the settings for your practice session:
- Choose which notes/chords/keys you would like to include
- Choose which scale formations you would like included (only for chords and scales)
- Choose whether you would like the notes/chords/keys to appear in order or randomly
- Choose how much time you are given to press the correct keys, how long corrections are displayed for incorrect answers, and how many prompts you will receive before being graded.
Once chosen, the drilling will begin. Simply press the keys that correspond to the prompt at the top of the page as quickly as possible. Eventually it will become second nature. Hopefully.
Free Play Mode
This is exactly what it sounds like. Just play around on the piano to your heart’s content.