This article is about a Digital Piano program I wrote to help me learn music theory and for ear training. I wrote the program in a language called Processing which is built on top of Java. The program runs in a web browser as well as a standalone Windows or Mac program. The program consists of a photo of my piano keyboard and a collection of MP3 files of individual notes being player. You play the piano by either clicking the keys with the mouse or using the computer keyboard. The following diagram shows the correspondence between letters and notes.
In case you are wondering about the logic behind these key binding, here is a picture of the computer keyboard with the piano keyboard superimposed. The keys at the bottom of the keyboard (starting at Z) are an octave lower than the upper row of keys.
When a note is played the note name is displayed in yellow text below the key. Black notes are either sharps of flats, so both names are displayed. The letter f is used to denote the flat symbol. For example: C# Df. Play another note and the interval between this note and the previous note is displayed as the interval name, symbol and the number of semitones. This feature was the main purpose of writing this program. It is possible to play more than one note at a time, but the results are unpredicatble. Have fun playing the Digital Piano! Click here to start the Digital Piano