Enum Midi2 Kind
pub enum Midi2Kind {
PerNoteController {
registered: bool,
key: u8,
index: u8,
value: u32,
},
Controller {
registered: bool,
bank: u8,
index: u8,
value: u32,
},
RelativeController {
registered: bool,
bank: u8,
index: u8,
delta: i32,
},
PerNotePitchBend {
key: u8,
value: u32,
},
NoteOff {
key: u8,
velocity: u16,
attribute_type: u8,
attribute: u16,
},
NoteOn {
key: u8,
velocity: u16,
attribute_type: u8,
attribute: u16,
},
PolyPressure {
key: u8,
value: u32,
},
ControlChange {
controller: u8,
value: u32,
},
ProgramChange {
program: u8,
bank: Option<(u8, u8)>,
},
ChannelPressure {
value: u32,
},
PitchBend {
value: u32,
},
PerNoteManagement {
key: u8,
detach: bool,
reset: bool,
},
}Expand description
MIDI 2.0 channel voice data. No resolution scaling or protocol conversion.
Controller meanings, attributes, per-note ownership and negotiated profiles belong to the consumer. Receivers ignore reserved bits; encoding sets them to zero. Unknown note attribute types are retained for future interpretation.
Variants§
PerNoteController
Registered (true) or assignable (false) per-note controller; index is eight bits.
Controller
Registered (true) or assignable (false) absolute controller.
RelativeController
Signed two’s-complement relative controller change.
PerNotePitchBend
Unsigned bipolar per-note bend, centered at 0x80000000.
NoteOff
Release velocity and uninterpreted attribute type/data.
NoteOn
Zero velocity remains Note On, unlike MIDI 1.0.
PolyPressure
Per-key pressure at full 32-bit resolution.
ControlChange
Seven-bit channel controller index and full 32-bit value.
ProgramChange
Program and optional (MSB, LSB) bank selection, all seven-bit.
ChannelPressure
Channel pressure at full 32-bit resolution.
PitchBend
Unsigned bipolar channel bend, centered at 0x80000000.
PerNoteManagement
Detach previous notes’ controllers and/or reset controllers to defaults.