Draft High Resolution MIDI Protocol

Introduction

HR-MIDI is a protocol for communicating between music synthesizers, computers and musical controllers. HR-MIDI is intended to address limitations of MIDI 1.0 (Musical Instrument Device Interface).

The MIDI standard is a widely supported industry standard for communicating and recording musical performances and has been hugely successful. Unfortunately, MIDI is quite old now and its limitations are restricting musicians.

Limitations of MIDI:

  • Low resolution. Modern music software supports high-resolution control of instrument parameters, typically 32-bit values are supported. Yet most key MIDI 1.0 values are only 7-bit. This quantization reduces the expressiveness and fidelity of music created with MIDI 1.0.
  • Not enough channels. MIDI 1.0 supports only 16 channels, typically this restricts each MIDI stream to only 16 instruments.
  • Not enough polyphonic controllers (MIDI supports only one polyphonic controller - polyphonic aftertouch). Polyphonic controllers are essential for non-keyboard controllers such as guitars and wind instruments, even modern keyboard controllers such as the Seaboard Rise require support for multiple per-note controllers. There is no good technical reason for relegating these "alternate" controllers to second-class status anymore.
  • Fragmented and ad-hoc protocol. MIDI 1.0 has several different messages just to send controllers. These can be combined into a single message type.
Existing Alternatives to MIDI 1.0

There have been several alternatives to MIDI 1.0 proposed. Some, such as Open Sound Control and ZIPI threw out everything and started over with complex, unfamiliar implementations. Considering that MIDI's main problem is simply lack of resolution this seems unnecessary and places an undue burden on implementers.

MPE (MIDI Polyphonic Expression) is a solution used by the Seaboard Rise, it uses the existing MIDI standard but utilizes one MIDI Channel per note. This reduces the available polyphony of a MIDI stream from 2048 (128 keys times 16 channels) to only 16 simultaneous notes. MPE supports 128 polyphonic Continous Controllers per note though, which is a win. It works relatively well but the limitation on polyphony is a significant drawback. Spreading notes of many channels also confusingly blurs the line between keys and channels. MPE MIDI data is not intuitive to edit in most existing DAWs.

The MIDI manufactures Association has proposed a solution called "HD Protocol". Development of which has been stalled for over 10 years. Due to lack of consensus amongst the stakeholders HD Protocol may never be released.

Benefits of HR-MIDI

What HR-MIDI proposes is very simple - keep all the good familiar stuff from MIDI 1.0, but increase the resolution of controllers, the number of controllers and the number of channels.

 The goals of HR-MIDI:

  • Same familiar concepts (Channels, Keys, Continuous Controls).
  • Higher resolution for all values.
  • More per-key continuous controllers, including per-key pitch-bend.
  • Translation from MIDI 1.0 should be trivial and lossless.
  • Simplification of protocol by consolidating the types of messages.
  • "wrappable" in existing MIDI SYSEX format to provide a gentle upgrade path for existing hardware and software.
Key Specs
  • 16 Channels plus 128 Sub-Channels. 1024 Channels total (11-bit)
  • 127 keys per channel (7-bit)
  • 16384 velocity levels (14-bit)
  • 16384 continuous controllers per channel (14-bit)
  • 128 polyphonic continuous controllers per key number(7-bit)
  • 16384 RPN and NRPN controllers per channel (14-bit)
  • 2097152 pitch values (21-bit)

Messages

Messages can be sent over regular MIDI in a standard SYSEX wrapper. With HR-Aware hardware and software instruments, HR-MIDI can be sent as-is, the receiver can unambiguously distinguish the HR messages by their longer length.

HR-MIDI SYSEX Wrapper.

F0 7F 00 70 00 [HR-MIDI message] F7

F0 = System-Exclusive
7F = Universal Realtime
00 = <device-id> (unused)
70 = Sub-ID: HR-MIDI
00 = Sub-ID (low bits)
... (HR-MIDI message goes here)
F7 = End of SYSEX

The following are the format of the available HR-MIDI messages.

Note-On

9n [nn] [kk] [vvvv] [pppppp]

9 = Status: Note On
n = Channel number. 4-bit resolution (0 - 15)
nn = Channel extended bits. Provides additional 128 sub-channels on each channel.
[vvvv] = velocity. 14-bit resolution. (0 - 16384)
[kk] = key number. 7-bit resolution. (0 - 127)
[pppppp] = Direct Pitch (Optional). 21-bit resolution. 0xffffff = no-change. Upper 7-bits are semitone. lower 14 are fraction of semitone.

Note-Off
8n [nn] [kk] [vvvv]

8 = Status: Note Off
n = Channel number. 4-bit resolution (0 - 15)
nn = Channel extended bits
[vvvv] = Note-off velocity. 16-bit resolution. (0 -  16384)
[kk] = key number. 7-bit resolution. (0 - 127)

Control Change
Bn [nn] [cccc] [vvvv]

B = Status: Controller
n = Channel number. 4-bit resolution (0 - 15)
nn = Channel extended bits
[cccc] = Controller Number. 14-bit resolution.
[vvvv] - Controller value. 14-bit resolution.

Pitch Bend

Bn [nn] [80] [vvvv]

B = Status: Controller
n = Channel number. 4-bit resolution (0 - 15)
nn = Channel extended bits
[80] = Controller Number 0x80 (128)  (Pitch Bend - NEW)
[vvvv] - Controller value. 14-bit resolution.

Channel Pressure (Monophonic Aftertouch)

Bn [nn] [46] [vvvv]

B = Status: Controller
n = Channel number. 4-bit resolution (0 - 15)
nn = Channel extended bits
[46] = Controller Number 0x46 (70)  (Aftertouch - from MPE).
[vvvv] - Controller value. 14-bit resolution.

Poly AfterTouch

An [nn] [kk] [46] [vvvv]

A = Status: Polyphonic Controller
n = Channel number. 4-bit resolution (0 - 15)
nn = Channel extended bits.
[kk] = key number. 7-bit resolution. (0 - 127).
[46] = Controller Number 0x46 (70)  (Aftertouch - from MPE).
[vvvv] - Controller value. 14-bit resolution.

Poly Controller - NEW

An [nn] [kk] [cc] [vvvv]

A = Status: Polyphonic Controller
n = Channel number. 4-bit resolution (0 - 15)
nn = Channel extended bits.
[kk] = key number. 7-bit resolution. (0 - 127).
[cc] = Controller Number (0 - 127).
[vvvv] - Controller value. 14-bit resolution.

Poly Pitchbend - NEW

An [nn] [kk] [80] [vvvv]

A = Status: Polyphonic Controller
n = Channel number. 4-bit resolution (0 - 15)
nn = Channel extended bits
[kk] = key number. 7-bit resolution. (0 - 127).
[80] = Controller Number 0x80 (128)  (Poly Pitch Bend - NEW)
[vvvv] - Controller value. 14-bit resolution.

Program/Bank Change

Cn [nn] [FF] [FFFF] [vvvv]

C = Status: Program Change
n = Channel number. 4-bit resolution (0 - 15)
nn = Channel extended bits
FF = All-keys.
[FFFF] = Reserved.
[vvvv] - Program Number. 14-bit resolution. Upper 7 bits is Bank, lower 7 bits is Program.

RPN
Dn [nn] 00 [rrrr] [vvvv]

D = Status: RPN/NRPN
n = Channel number. 4-bit resolution (0 - 15)
nn = Channel extended bits
00 = RPN
[rrrr] = Registered Parameter Number. 14-bit resolution.
[vvvv] - Controller value. 14-bit resolution.

NRPN

Dn [nn] 01 [rrrr] [vvvv]

D = Status: RPN/NRPN
n = Channel number. 4-bit resolution (0 - 15)
nn = Channel extended bits
01 = NRPN
[rrrr] = Non-registered Parameter Number. 14-bit resolution.
[vvvv] - Controller value. 14-bit resolution.

Real-time Tuning

An [nn] [kk] [--] [pppppp]

A = Status: Polyphonic Controller
n = Channel number. 4-bit resolution (0 - 15)
nn = Channel extended bits
[kk] = key number. 8-bit resolution. (0 - 254).
[--] = Controller Number 0x0102 (Direct Pich)
[vvvv] - Controller value. 16-bit resolution. TODO 16 is not enough.!!! need 21-bits. Maybe all controls could be 21 bits?

Maby don't need, just rely on pitch bend and SYSEX tuning messages.

SYSEX

F0 ... [FF]

Status Bytes

MIDI 1.0

80 = Note-Off
90 = Note-On
A0 = Poly Aftertouch
B0 = Continuous Controller
C0 = Program Change
D0 = Channel Pressure (monophonic aftertouch)
E0 = Pitch Bender
F0 = System Exclusive

HR-MIDI

80 = Note-Off
90 = Note-On
A0 = Polyphonic Continuous Controllers. [Aftertouch, incorporating real-time tuning]
B0 = Continuous Controllers [incorporating Pitch-Bender, Channel Pressure]
C0 = Program Change [incorporating bank change]
D0 = RPN/NRPN
E0 = Reserved
F0 = System Exclusive

Example HR-MIDI VST and AU Instruments coming soon...

Issues:

Maybe poly controllers should be limited? to ease implementation. done, need to use General-Purpose Controllers for Pitch-Bend, Aftertouch and Direct Pitch, or should pitch-bend opcode be utilised for direct-pitch?