MIDI implementation
9. MIDI implementation
1. Received data
■Channel Voice Messages
● Note off
Status | 2nd byte | 3rd byte |
8nH | kkH | vvH |
n = MIDI channel number: | 0H~FH (Ch.1~16) | |
kk = note number: |
| 00H~7FH (0~127) |
vv = note off velocity: | 00H~7FH (0~127) | |
● Note on |
|
|
Status | 2nd byte | 3rd byte |
9nH | kkH | vvH |
n = MIDI channel number: | 0H~FH (Ch.1~16) | |
kk = note number: |
| 00H~7FH (0~127) |
vv = note on velocity: | 01H~7FH (1~127) |
●Control Change
•The value specified by a Control Change message is not reset by a Program Change, etc.
❍Bank Select (Controller number 0, 32)
Status | 2nd byte | 3rd byte |
BnH | 00H | mmH |
BnH | 20H | llH |
n = MIDI channel number: | 0H~FH (Ch.1~16) | |
mm = Bank number MSB: | 00H~7FH | |
ll = Bank number LSB: | 00H~7FH |
•Only for Free Bass.
❍Expression (Controller number 11)
Status | 2nd byte | 3rd byte |
BnH | 0BH | vvH |
n = MIDI channel number: | 0H~FH (Ch.1~16) | |
vv = Expression: |
| 00H~7FH (0~127) |
•This adjusts the volume of a Part. It can be used independently from Volume (CC07) messages. Expression messages are used for musical expression within a performance, e.g., expression pedal movements, crescendo and decrescendo.
■System Exclusive Messages
Status | Data byte | Status |
F0H | iiH, ddH, ......,eeH | F7H |
F0H: | System Exclusive Message status | |
ii = ID number: | An ID number (manufacturer ID) to indicate the manufacturer | |
| whose Exclusive message this is. Roland’s manufacturer ID is | |
| 41H. |
|
dd,...,ee = data: | 00H~7FH (0~127) |
|
F7H: | EOX (End Of Exclusive) |
The System Exclusive Messages received by the
●Data Set 1 DT1 (12H)
Status | Data byte | Status |
F0H | 41H, dev, 42H, 12H, aaH, bbH, ccH, ddH, … eeH, | F7H |
| ffH, sum |
|
Byte | Explanation |
|
F0H | Exclusive status |
|
41H | ID number (Roland) |
|
10H | Device ID |
|
00H | Model ID #1 |
|
7CH | Model ID #2 |
|
12H | Command ID (DT1) |
|
aaH | Address MSB: upper byte of the starting address of |
|
| the data to be sent |
|
bbH | Address: upper middle byte of the starting address of |
|
| the data to be sent |
|
ccH | Address: lower middle byte of the starting address of |
|
| the data to be sent |
|
ddH | Address LSB: lower byte of the starting address of |
|
| the data to be sent |
|
eeH | Data: the actual data to be sent. Multiple bytes of data |
|
| are transmitted in order starting from the address. |
|
:: | :: |
|
ffH | Data |
|
sum | Checksum |
|
F7H | EOX (End of Exclusive) |
|
• | The amount of data that can be received at one time depends on the type of data, |
| and data will be transmitted from the specified starting address and size. |
• | Data larger than 256 bytes must be divided into packets of 256 bytes or less, and |
❍Hold 1 (Controller number 64)
Status | 2nd byte |
BnH | 40H |
n = MIDI channel number:
vv= Control value:
❍Program Change
Status | 2nd byte |
CnH | ppH |
n = MIDI channel number:
pp= Program number:
❍Channel Pressure
Status | 2nd byte |
DnH | vvH |
n = MIDI channel number: vv = Channel Pressure:
3rd byte
vvH
0H~FH (Ch.1~16) 00H~7FH (0~127) 00H~63H= Off/64H~7FH= On
0H~FH (Ch.1~16)
00H~0DH: Treble Register 1~14
00H~15H: Orchestra Register 1~22
00H~06H: Bass/FreeBass/Orch.Bass/Orch Chord, Orch Free Bass Register 1~7 00H~27H: Set 1~40
0H~FH (Ch.1~16) 00H~7FH (0~127)
each packet must be sent at an interval of about 20ms. |
2. Transmitted data
■Channel Voice Messages
● Note off
Status | 2nd byte | 3rd byte |
8nH | kkH | vvH |
n = MIDI channel number: | 0H~FH (Ch.1~16) | |
kk = note number: |
| 00H~7FH (0~127) |
vv = note off velocity: | 00H~7FH (0~127) | |
● Note on |
|
|
Status | 2nd byte | 3rd byte |
9nH | kkH | vvH |
n = MIDI channel number: | 0H~FH (Ch.1~16) | |
kk = note number: |
| 00H~7FH (0~127) |
vv = note on velocity: | 01H~7FH (1~127) |
●Control Change
❍Bank Select (Controller number 0, 32)
■System Realtime Messages
❍Active Sensing Status
FEH
•When Active Sensing is received, the
❍Start Status
FAH
•When an FA message is received from an external MIDI device such as sequenc- er, the
Status | 2nd byte | 3rd byte |
BnH | 00H | mmH |
BnH | 20H | llH |
n = MIDI channel number: | 0H~FH (Ch.1~16) | |
mm = Bank number MSB: | 00H~7FH | |
ll = Bank number LSB: | 00H~7FH |
❍Volume (Controller number 7)
Status | 2nd byte | 3rd byte |
BnH | 07H | vvH |
n = MIDI channel number: | 0H~FH (Ch.1~16) | |
vv = Volume: |
| 00H~7FH (0~127), Initial value = 64H (100) |
•Volume messages are used to adjust the volume balance of each Part.