AUDIO
Source snapshot · 11 November 2026

Portable MIDI short messages

Universal MIDI Packet framing

UmpPacket owns up to four numeric words and validates the message-type word count. UmpDecoder incrementally frames all sixteen message types, including reserved types, without allocating or guessing a recovery boundary. finish reports incomplete input without discarding it; reset explicitly discards it. Payload bits remain opaque. Group lookup returns a value only for currently defined grouped types; utility, stream and reserved types return None.

from_be_bytes and write_be_bytes explicitly select big-endian serialization. UMP itself does not prescribe a universal transport byte order. The writer rejects undersized destinations before mutation and preserves unused tails. See the primary UMP v1.1.2 specification for framing and transport separation. This framing API does not validate message semantics, assemble SysEx, negotiate protocols or supply native UMP device and plug-in adapters. Existing processor events and sine synthesis still use MIDI 1.0.