AUDIO
Source snapshot · 11 November 2026

Portable MIDI short messages

MIDI 2.0 channel voice codecs

Midi2Message interprets MT=4 packets and encodes every defined channel voice status: notes, poly/channel pressure, control change, registered/assignable absolute and relative controllers, per-note controllers and pitch bend, channel pitch bend, program/bank changes and per-note management. Fields retain 16-bit velocity and 32-bit control data. Relative data uses signed two's complement; pitch bend is unsigned with midpoint 0x80000000. A zero-velocity MIDI 2.0 Note On remains Note On. Group and channel use zero-based 0..15 values.

Sender construction rejects out-of-range seven-bit fields. Per-note controller indices are eight-bit. Encoding zeroes reserved fields; receiving ignores reserved bits for forward compatibility. Unknown note attribute types retain their type and data. Type zero canonicalizes its ignored data to zero, and an absent bank ignores bank bytes. Reserved status 7 and other message types reject. Preserve the original UmpPacket when exact unknown/reserved bit retention is needed.

The codec performs no quantization, MIDI 1.0 translation, controller interpretation, voice ownership, profile discovery or native delivery. Consumers must negotiate a group's protocol and implement performance policy. Existing sine/CLAP and device paths do not automatically gain MIDI 2.0 performance support.