MIDI (Musical Instrument Digital Interface) is a fantastic standard because it is versatile enough to encompass almost all instruments, but simple enough to work with using low-power digital hardware. A typical MIDI message contains three bytes. The first is a status byte that describes the action (like “note on”) and the channel to use, the second byte contains the note to play, and the third byte defines the velocity. Because a single switch can act as a trigger to send a MIDI message, one can turn an old touch tone telephone into a MIDI instrument.
The phone used in this project and most others like it have numeric keypads set up in the same way as keyboards, with a matrix reducing the number of I/O pins needed on a connected microcontroller. Multiply the number or rows in the matrix by the number of columns to get the maximum number of keys. This particular keypad had a combined row/column total of 11, which means it could support up to 30 unique keys. But only 12 of those are connected, so the tutorial includes instructions on how to identify the key that each row/column combo triggers. Once you know that information, you can connect the row and column wires to the I/O pins of an Arduino.
The provided Arduino sketch will handle pretty much everything else after you assign the pin numbers, but it is still worth understanding how it works. First, it loops through all of the necessary rows and columns to determine the states of every button. From there, it sends the assigned MIDI message through a MIDI jack connected to the Arduino through three wires. You can assign pre-made messages to specific keys, or you can get creative and create special algorithms that alter the messages based on key combos or sequences. Connect any MIDI output device to the MIDI jack to synthesize or sample the notes, or connect it to a computer to record MIDI sequences.
As a bonus, this tutorial even explains how to convert the handset into a functional microphone that you can amplify, so you can have vocals to accompany your MIDI music.