Expand description
Decode Universal MIDI Packets back into messages, and translate MIDI 2.0 channel-voice → MIDI 1.0 channel-voice (with default resolution down-scaling).
Enums§
- UmpDecoded
- The decoded content of a UMP, spanning the message types this lane models.
Functions§
- decode
- Decode any modelled UMP, dispatching on Message Type.
- decode_
midi1_ channel_ voice - Decode a MIDI 1.0 channel-voice UMP (MT 0x2) into a
MidiMessage. ErrorsAudioError::UnsupportedFormatif the packet is not MT 0x2. - decode_
midi2_ channel_ voice - Decode a MIDI 2.0 channel-voice UMP (MT 0x4) into a
Midi2ChannelVoice. ErrorsAudioError::UnsupportedFormatif the packet is not MT 0x4, orAudioError::MalformedAudioif it does not carry two words. - translate_
midi2_ to_ midi1 - Translate a MIDI 2.0 channel-voice message down to the MIDI 1.0 model, applying default resolution down-scaling. Per the MIDI 2.0 default translation, a MIDI 2.0 Note On whose velocity scales down to 0 is clamped to velocity 1 so it is not misread as a MIDI 1.0 implicit note-off.