MIDI data in hexadecimals
Results 1 to 7 of 7
  1. #1
    Tech Mentor
    Join Date
    Jul 2010
    Location
    The Netherlands
    Posts
    175

    Default 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!

  2. #2

    Default

    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

    http://www.ascii.cl/conversion.htm

    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
    Last edited by DJ Phatso; 09-07-2010 at 09:50 AM.
    The Phat One

  3. #3
    Tech Mentor
    Join Date
    Jul 2010
    Location
    The Netherlands
    Posts
    175

    Default

    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!

  4. #4
    Tech Guru BradCee's Avatar
    Join Date
    Sep 2009
    Location
    Amazingstoke, UK
    Posts
    4,435

    Default

    how is 127 converted to 7f? i don't get it

    edit; never mind, wiki'd it. makes sense now
    Last edited by BradCee; 09-07-2010 at 10:38 AM.

    Win 7 / 2x Reloop Contour / Numark M6 /Traktor Pro 2.5
    SoundCloud

  5. #5

    Default

    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
    The Phat One

  6. #6
    Tech Guru eastcoastams's Avatar
    Join Date
    Feb 2010
    Location
    New Hampshire
    Posts
    549

    Default

    Whoa good thread

  7. #7
    Tech Guru Fatlimey's Avatar
    Join Date
    Mar 2008
    Location
    Redmond, WA
    Posts
    1,159

    Default

    Quote Originally Posted by DJ Phatso View Post
    -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.

    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!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •