Digital Sound & Music: Concepts, Applications, & Science, Chapter 6, last updated 6/25/2013
14
Figure 6.14 Patch assignments in the General MIDI standard, as shown in Cakewalk
Sonar
A Closer Look at MIDI Messages 6.1.5
Binary, Decimal, and Hexadecimal Numbers 6.1.5.1
When you read about MIDI message formats or see them in software interfaces, you’ll find that
they are sometimes represented as binary numbers, sometimes as decimal numbers, and
sometimes as hexadecimal numbers (hex, for short), so you should get comfortable moving from
one base to another. Binary is base 2, decimal is base 10, and hex is base 16. You can indicate
the base of a number with a subscript, as in 011111002, 7C16, and 12410. Often, 0x is placed in
front of hex numbers, as in 0x7C. Some sources use an H after a hex number, as in 7CH.
Usually, you can tell by context what base is intended, and we’ll omit the subscript unless the
context is not clear. We assume that you understand number bases and can convert from one to
another. If not, you should easily be able to find a resource on this for a quick crash course.
Binary and hexadecimal are useful ways to represent MIDI messages because they allow
us to divide the messages in meaningful groups. A byte is eight bits. Half a byte is four bits,
called a nibble. The two nibbles of a MIDI message can encode two separate pieces of
information. This fact becomes important in interpreting MIDI messages, as we’ll show in the
Previous Page Next Page