
344 MAKING THINGS TALK
Other Useful Protocols
There are many more useful protocols than have been covered. Here are a few that you
might run across, along with some notes on where to begin learning about them.
MIDI
The Musical Instrument Digital Interface (MIDI) protocol
is a protocol for real-time communication between digital
musical instruments. It’s the granddaddy of digital
synthesizer protocols. Most music synthesizers, sequenc-
ers, samplers, keyboards, and workstations on the market
today speak MIDI. If you plan to make music using hardware,
you’re going to run across it. It’s a serial protocol running
at 31,250 bps. There’s a standard MIDI connector called
a DIN5 connector that you’ll find on all MIDI gear. All the
connectors on the gear are female plugs, and the cables all
have male connectors on both ends. Figure A-1 shows the
MIDI connector and a simple MIDI output circuit from an
Arduino board. You can find hundreds of examples of how
to send and receive MIDI data online.
MIDI messages are divided into three or more bytes. The
first byte, a command byte, is always greater than 127
in value. Its value depends on the command. The bytes
that follow it are called status bytes. All status bytes
have values less than 128. This makes it possible to tell a
command byte from a status byte by the value alone.
There are a number of different MIDI commands. The
most basic, note on ...