MIDI data in hexadecimals

MIDI data in hexadecimals

Dear DJTT’ers,

Does any of you know how to convert MIDI data to hexidecimals?
All i know is (the hexadecimals are that value when button is pressed):
MIDI Key | Hexadecimals
A4 90 45 7F
A#4 90 46 7F
C4 90 3C 7F
E5 90 4C 7F
G#5 90 44 7F

I already figured out that 7F means that the button is pressed. But what is up
with the 90 and the second value? How can i translate MIDI dat to hexadecimals?

Thanks in advance!

Many ways to go about this:

  • Use a scientific calculator

  • Use an online converter

http://www.easycalculation.com/decimal-converter.php

  • Use a convertion table

This is all fun and games, but it would be useful for you to learn and understand the rules of Hex:

Hexadecimal is base 16.

Base 16 is where the ‘numbers’ you can use are zero through to the letter F (0123456789ABCDEF).

For example:

  • the decimal value for ‘1’ is represented in hexadecimal as ‘1’ but
  • the hexadecimal value of ‘15’ (decimal) is shown as ‘F’ (hexadecimal)

Consequently, the value of ‘127’ (decimal) ‘7F’ in Hexadecimal, is the maximum value sent by the button when pressed. The mimimum value ( when releasing the button) is obviously 0.

As for MIDI messages , then it gets a little more complicated:

http://www.midi.org/techspecs/midimessages.php

Thanks for your explanation! I understand hexadecimals a bit, i can convert hex to decimals. But i still don’t get how E5 can be 90 4C. I don’t have much knowledge about the MIDI protocol.

Thanks in advance!

how is 127 converted to 7f? i don’t get it :confused:

edit; never mind, wiki’d it. makes sense now

As I said, MIDI can get pretty complicated, but let’s brake it down with an example you had:

A4 90 45 7F

First, you have to know that this is a 3 Bytes message, with each value having a specific meaning

-90: This is the Status byte, indicating the type of MIDI message being sent. In this case, 90 represent a NOTE ON message on Channel 1.

  • 45: the second byte defines the specific note being sent, namely A, the 4th one over Middle C, so A4, as was already displayed

-127: the 3rd byte tells you at which intensity the note was played. Since this represent a button on a controller, it would be either On (127) or Off (0), but if you were using a musical keyboard, this value could vary depending how hard or soft you would “play” the note.

For more info :

http://www.recordingeq.com/EQ/req0700/midi2.htm

Whoa good thread

A little more detail - the “90” is really two messages in one, the “9” says “NoteOn” and the “0” says “channel 1” (they start numbering form 0, so “4” is channel 5 and “f” is channel 16 in hex.

A message “80 45 00” is a “NoteOff” on channel 1 with a “release velocity” of 0. Not many keyboards measure release velocity, but other controllers have uses for that concept.

Now here’s the confusing bit: When you see something like “92 45 00” That’s a “NoteOn” in channel 3 with velocity “0”, which for many systems is also interpreted as a NoteOff. Zero velocity NoteOn messages are interchangable with NoteOff. Blame cheap hardware.

MIDI has many more messages and some interesting rules about when they can be sent (check the MIDI clock byte and all about “aftertouch” values). Reading a tutorial is pretty much essential!