###################
#                 #
#  MIDI Messages  #
#                 #
###################

$00-$7F Data bytes
$80-$F7 Status bytes
$F8-$FF Real-time Messages



###################################################################
#                                                                 #
#  Channel Voice Messages - Recognized by selected channel only   #
#                                                                 #
###################################################################

-------------------------------------------------------------------

$80-$8F  Note Off  3 bytes
==========================

  $8x $nn $vv

 x: 0-15, MIDI channel 1-16
nn: Note number      0-127 ($00-$7F)
vv: Release Velocity 0-127 ($00-$7F)

-------------------------------------------------------------------

$90-$9F  Note On  3 bytes
=========================

  $9x $nn $vv

 x: 0-15, MIDI channel 1-16
nn: Note number  0-127 ($00-$7F)
vv: Key Velocity 0-127 ($00-$7F)

If Velocity = 0 then this is a Note Off message.

-------------------------------------------------------------------

$A0-$AF  Polyphonic Pressure  3 bytes
=====================================

  $Ax $nn $pp

 x: 0-15, MIDI channel 1-16
nn: Note number           0-127 ($00-$7F)
pp: Pressure (Aftertouch) 0-127 ($00-$7F)

-------------------------------------------------------------------

$B0-$BF  Control Change  3 bytes
================================

  $Bx $cc $vv

 x: 0-15, MIDI channel 1-16
cc: Controller Number 0-127 ($00-$7F)
vv: Controller Value  0-127 ($00-$7F)


Controller Number 0-63: Continuous Controllers, Value = 0-127

  0 Bank Select MSB       16 Joystick X   32 Bank Select LSB  48
  1 Modulation Wheel      17 Joystick Y   33                  49
  2 Breath Control (+VCF) 18              34                  50
  3                       19              35                  51
  4 Pedal ?               20              36                  52
  5                       21              37                  53
  6 Data Entry Slider     22              38                  54
  7 Main Volume           23              39                  55
  8                       24              40                  56
  9                       25              41                  57
 10 Pan Position          26              42                  58
 11 Expression Pedal      27              43                  59
 12 Effect Control 1      28              44                  60
 13 Effect Control 2      29              45                  61
 14                       30              46                  62
 15                       31              47                  63


Controller Number 64-89: On/Off Controllers, Value 0-63 = Off, 64-127 On

 64 Hold/Sustain Pedal-1
 65 Portamento Switch
 89 ...


Controller Number 90-119 ... Controllers, Value = 0-127

 90 ...
 91 Effect Depth 1 (Ext Efx)
 92 Effect Depth 2 (Tremolo)
 93 Effect Depth 3 (Chorus)
 94 Effect Depth 4 (Celeste)
 95 Effect Depth 5 (Phaser)
 96 Data Slider Increment
 97 Data Slider Decrement
 98 ...
 99 ...
100 Roland RPC LSB
101 Roland RPC MSB
119 ...


Controller Number 120-127: Mode Messages, Value = 0 (or 0/127, 0-127)

120 ...
121 Reset All Controllers
122 Local Control Off(0) On(127)
123 All Notes Off
124 OMNI Off
125 ONMI On
126 MONO, Value = number of channels
127 POLY

Controllers 124-127 will (usually) also turn All Notes Off

-------------------------------------------------------------------

$C0-$CF  Program Change  2 bytes
================================

  $Cx $pp

 x: 0-15, MIDI channel 1-16
pp: Program Number 0-127 ($00-$7F)

-------------------------------------------------------------------

$D0-$DF  Channel Pressure  2 bytes
==================================

  $Dx $pp

 x: 0-15, MIDI channel 1-16
pp: Pressure (Aftertouch) 0-127 ($00-$7F)

-------------------------------------------------------------------

$E0-$EF  Pitch Wheel Change  3 bytes
====================================

  $Ex $ll $mm

 x: 0-15, MIDI channel 1-16
ll: Pitch Wheel LSB (Least Significant 7 Bits) 0-127 ($00-$7F)
mm: Pitch Wheel MSB (Most Significant 7 Bits)  0-127 ($00-$7F)

Pitch Wheel is MSB+LSB, 14 bits total

-------------------------------------------------------------------




###################################################################
#                                                                 #
#  System Common Messages - Recognized by all channels            #
#                                                                 #
###################################################################

-------------------------------------------------------------------

$F0  System Exclusive (SOX)  variable length
============================================

  $F0 ...<n data bytes>... $F7

SOX (Start of Exclusive) followed by manufacturer number etc. plus
n data bytes. The System Exclusive message is terminated by EOX
(End of Exclusive) $F7.

-------------------------------------------------------------------

$F1  Quarter Frame (MTC)  2 bytes
=================================

  $F1 $tt

tt: MTC (MIDI Time Code) data

You need four Quarter Frame messages to assemble a full SMPTE/MTC
time code frame.

Data format is not given here.

-------------------------------------------------------------------

$F2 Song Position Pointer (SPP) 3 bytes
=======================================

  $F2 $ll $mm

ll: SPP LSB (Least Significant 7 Bits) 0-127 ($00-$7F)
mm: SPP MSB (Most Significant 7 Bits)  0-127 ($00-$7F)

-------------------------------------------------------------------

$F3  Song Select  2 bytes
=========================

  $F3 $ss

ss: Song Number 0-127 ($00-$7F)

-------------------------------------------------------------------

$F4  (Undefined)
================

  $F4

This message is undefined. Don't use it!

-------------------------------------------------------------------

$F5  (Undefined)
================

  $F5

This message is undefined. Don't use it!

-------------------------------------------------------------------

$F6  Tune Request  1 byte
=========================

  $F6

Requests all connected analog synthesizers to start an automatic
oscillator tuning sequence.

-------------------------------------------------------------------

$F7  End of Exclusive (EOX)  1 byte
===================================

  $F7

Terminates an System Exclusive Message that was started with
SOX (Start of Exclusive) $F0.

-------------------------------------------------------------------




###################################################################
#                                                                 #
#  System Real-time Messages - Global, doesn't set new status     #
#                                                                 #
###################################################################

-------------------------------------------------------------------

$F8  MIDI Timing Clock  1 byte
==============================

  $F8

-------------------------------------------------------------------

$F9  (Undefined)
================

  $F9

-------------------------------------------------------------------

$FA  Start  1 byte
==================

  $FA

-------------------------------------------------------------------

$FB  Continue  1 byte
=====================

  $FB

-------------------------------------------------------------------

$FC  Stop  1 byte
=================

  $FC

-------------------------------------------------------------------

$FD  (Undefined)
================

  $FD

-------------------------------------------------------------------

$FE  Active Sensing  1 byte
===========================

  $FE

-------------------------------------------------------------------

$FF  System Reset  1 byte
=========================

  $FF

-------------------------------------------------------------------

; End of File
