(compMus1) Nibbles, Hexadecimal, and the Noteon Command

Nibbles

In binary notation, 8 bits equals one byte. Four bits equals a nibble.

A nibble can be represented with one hexadecimal place. Translating large binary numbers to hexadecimal is much easier than translating large binary numbers to base 10. By dividing the binary number into 4-bit nibbles and converting the result to hexadecimal, you don’t have to factor out each binary place. Since MIDI messages are 8 bits in length, they translate quickly into two hexadecimal places.

Hexadecimal

Indicating hexadecimal notation varies by application. On he web, RGB color is indicated by three pairs of hexadecimal numbers preceeded by a #. For example, #FFFFFF. Some people, including Holmes in E/E, use the 0x (Zero-x) prefix. This is especially useful for understanding MIDI status bytes for channel messages.

The Noteon Message

The noteon message consists of a status byte, followed by two data bytes representing note number and key velocity. The status byte is broken down into two nibbles, the command number (9 for noteon, 1001 in binary) and the MIDI channel to receive the command. A noteon message for MIDI channel 2 would be represented in Hexadecimal notation as 0x91 (MIDI channel 1 – 16 is represented as 0 – 15 in binary and Hex code), and in binary as 1001 0001.

All MIDI channel commands are numbered 8 through 14. Anything lower than 8 will not have a one as the first bit to indicate a status byte.

The noteoff command is seldomed used. It is more common to use a noteon command with the velocity set to zero.


Comments

One response to “(compMus1) Nibbles, Hexadecimal, and the Noteon Command”

  1. […] From Nibbles, Hexadecimal, and the Noteon Command: […]

Leave a Reply