A MIDI controller can control any MIDI instrument by
sending it MIDI messages over a standard transport
protocol. The original MIDI specification calls for a serial
protocol at 31250 baud sent through a five-pin DIN
connector. This is the protocol we will use here because
it’s supported by the majority of MIDI instruments.
However, it is worth noting that there are other MIDI
transport protocols in use; for example, MIDI over USB,
Firewire, and Bluetooth LE. It would be an interesting
follow-up project to modify the MIDI lyre to support one
or more of these newer transport protocols.
A MIDI message is made up of an eight-bit status byte
optionally followed by one or two data bytes. There are a
large number of MIDI messages, but the only ones that
concern us for the lyre are the MIDI Note On and (for
completeness) Note Off messages. Note On causes the
MIDI instrument to play a particular note; Note Off causes
it to turn that note off.
The On and Off messages are shown in Table 1. Each
message begins with a status byte where the most
significant four bits of each message (1001 and 1000,
respectively, in this case) indicate what the message
means, and the least significant four bits specify the
channel. There is a total of 16 MIDI channels, and you can
assign a different instrument to each one.
We will be sending on channel 0000, so the MIDI
status byte for Note On will be 10010000 ( 90
hexadecimal); for Note Off, it will be 10000000 ( 80
The next byte is the Note Byte which is a number
from 0 to 127. MIDI defines 128 possible notes such that
each increment by one represents a semitone increase in
pitch. Middle C is (usually) MIDI number 60 and middle
C# is (usually) MIDI number 61. We say “usually” because
how a particular MIDI instrument is tuned is up to the
The final byte in the Note On and Note Off messages
is the Velocity Byte, which is a number from 0 (silent) to
127 (maximum volume). The MIDI lyre will always send at
maximum volume (127) because it doesn’t have any touch
capability for volume control.
A MIDI keyboard controller works by sending a Note
On when a key is pressed and sending a Note Off when it
is released. Depending on the voice selected, the note will
stop immediately or decay at some preset rate when the
key is released. That’s fine for a keyboard, but how do we
simulate a plucked instrument using MIDI?
If you consider the action of plucking a lyre (or any
other plucked instrument), it goes something like this:
1. Touch string.
2. Pull string from its equilibrium position.
3. Release string.
The release of the string causes it to start vibrating,
and these vibrations are transmitted to a soundboard fixed
over a resonant cavity that amplifies the vibrations and
creates the sound.
If we consider a touch event as a simple pulse (as
shown in Figure 1), then a keyboard sends a Note On
message on the rising edge of the pulse when a key is
pressed, and a plucked instrument sends a Note On
message on the falling edge of the pulse when a string is
released. The keyboard also sends a Note Off message
when the key is released.
Does a plucked instrument ever send a Note Off
message? Not really. For most plucked instruments, the
sound usually fades away naturally.
Now that we understand a bit about lyres and MIDI,
let’s consider the construction of the instrument itself.
Building the MIDI Lyre
There are two aspects to building the MIDI lyre: the
electronics and the touch sensors. We’ll start with the
The electronics are comprised of an Arduino Uno, an
Adafruit MRP121 capacitive touch sensor breakout board,
a female MIDI socket, a couple of resistors, and a couple
July/August 2018 25
Post comments on this article and find any associated files and/or downloads at
MIDI Message Status Byte Note Byte Velocity Byte
Note On 1001 nnnn 0kkkkkkk 0vvvvvvv
Note Off 1000 nnnn 0kkkkkkk 0vvvvvvv
■ FIGURE 1. A touch shown as a simple pulse.
Keyboards send a Note On event on the rising edge
and a Note Off event on the falling edge. Plucked
instruments send a Note On on the falling edge.