MIDI message decoder
Paste MIDI bytes in hexadecimal, from an Arduino serial print, a logic analyser, a MIDI monitor or a SysEx file, and read them as messages. The decoder follows the MIDI 1.0 wire rules: it handles running status, real-time bytes such as clock that arrive in the middle of another message, and System Exclusive. Nothing is uploaded; decoding happens in your browser.
Decoder
6 messages.
| # | Bytes | Message |
|---|---|---|
| 1 | 90 3C 64 | ch 1: Note on C4 (60), velocity 100 |
| 2 | 90 40 64running status | ch 1: Note on E4 (64), velocity 100 |
| 3 | 90 43 64running status | ch 1: Note on G4 (67), velocity 100 |
| 4 | 90 3C 00running status | ch 1: Note off C4 (60) — note on with velocity 0 |
| 5 | 90 40 00running status | ch 1: Note off E4 (64) — note on with velocity 0 |
| 6 | 90 43 00running status | ch 1: Note off G4 (67) — note on with velocity 0 |
Reading raw MIDI bytes
A byte of 80 or above is a status byte: it starts a message and says what kind it is. Bytes below 80 are data bytes. For channel messages the high four bits of the status are the type and the low four bits are the channel minus one, so 93 is a note on, channel 4. Note on, note off, CC, poly aftertouch and pitch bend have two data bytes; program change and channel aftertouch have one. MIDI messages in bytes lists them all.
Running status
To save bandwidth on the 31,250 baud wire, a sender may leave out a status byte when it is the same as the previous one. In the first example, 90 3C 64 40 64 43 64 is three note-ons on channel 1 with one status byte. Senders combine this with “note on, velocity 0” for note-offs, so a whole chord can play and stop under one status byte. The decoder marks these messages. Running status ends when any other status byte arrives, including SysEx and system common messages, but not real-time messages such as clock (F8), which may appear between any two bytes.
RPNs and NRPNs
Registered and non-registered parameter numbers are set with several CCs: CC 101/100 (RPN) or CC 99/98 (NRPN) choose the parameter, then Data Entry CC 6 and CC 38 set its value. The decoder remembers the last selection on each channel and says which parameter a Data Entry message changes. The second example sets the pitch bend range to 12 semitones; the pitch bend calculator builds these sequences.
Common problems the decoder exposes
- Trailing bytes: a log that cuts off mid-message leaves bytes that never complete. They are listed under the table.
- Data bytes first: a capture that starts in the middle of a message has data bytes with no status. They are skipped until the first status byte.
- Velocity 0 note-ons are note-offs. Code that only handles
8nleaves notes hanging; see MIDI troubleshooting. - SysEx with a high-bit byte inside is cut short. Check Roland messages with the SysEx checksum calculator.
For live input from a keyboard, use the monitor in the Web MIDI API tutorial. It uses the same parser as this page.