Midi HexaDecimal Coding (base 16 - denoted by "$" before the hex code)
$8c nn vv . . . .note off
$9c nn vv . . . note on ("off" if vv = 00)
$Ac dd dd . . aftertouch, polyphonic key
$Bc ## dd . . control change (or bank)
$Cc pp . . . . patch (program, instrument voice)
$Dc dd . . . . aftertouch, channel pressure
$Ec dd dd . . pitch bend
$F0 -- $F7 . . system exclusive (specific manufacturers code)
$FF - - $F0 . .system reset. tempo
where:
- the first letter is the hex start - tells what the coding will control. Note that all codes are greater or equal to 8
- c = channel, 0 to F in hex, 1 to 16 in practice (different channels are often used for different instrument sounds)
- nn = note value; example - C note = 0,12,24,36,48,60,72 in decimal so hex = $0, $c, $18, etc.
- vv = velocity, which is volume dependent on how hard the keys are pressed; a value of hex $50 is used when velocity is not in use
- dd = data. must be less than hex $80 - so it will not be interpreted as a code type change
- ## = control; example: 0 = bank, 7 = volume change
- pp = patch/ voice/instrument number; note that the hex goes 0 to 127, but some manufacturers refer to them as +1, or 1 to 128
note: shorthand notation can be employed - data without a command/channel designation (first 2 hex bytes) takes on the same command and channel as previously set in the last commands and channel selection.
note: that in the way "note on" ($9c - - ) is used, that it can also be used for "note off" if the velocity bits are set to zero. This saves space since shorthand notation can then be used, so some software uses only the $9 command for both off and ignores the $8 command for note off.
note: 1 or more bytes of clock will be between commands. It will be greater than 1 byte if the first byte(s) are greater than hex $80. The scheme (assuming the first two bytes are greater than $80) is:
time = 128 times* 128 times (byte 1 - hex $80) + 128 times (byte 2 - hex $80) + byte 3.
There are of course code subtleties not covered here . . but if you examine
the code, some of it may start to make sense. Also - the beginnings of a midi
file usually contain normal understandable ASCII telling sometimes the song
title and/or the author of the song and/or the owner of the rights to the midi
file.
Back to Main midi Page
Recommended eBook on Midi and One Person Band Music Making and Recording
To rpsoft 2000 software
|