#[repr(u8)]pub enum CodeIndexNumber {
Show 16 variants
MiscFunction = 0,
CableEvents = 1,
SystemCommon2Bytes = 2,
SystemCommon3Bytes = 3,
SysexStartsOrContinues = 4,
SystemCommon1Byte = 5,
SysexEnds2Bytes = 6,
SysexEnds3Bytes = 7,
NoteOff = 8,
NoteOn = 9,
PolyKeyPress = 10,
ControlChange = 11,
ProgramChange = 12,
ChannelPressure = 13,
PitchBendChange = 14,
SingleByte = 15,
}Expand description
The Code Index Number(CIN) indicates the classification of the bytes in the MIDI_x fields. Code Index Number classifications.
Variants§
MiscFunction = 0
Miscellaneous function codes. Reserved for future extensions.
CableEvents = 1
Cable events. Reserved for future expansion.
SystemCommon2Bytes = 2
Two-byte System Common messages like MTC, SongSelect, etc.
SystemCommon3Bytes = 3
Three-byte System Common messages like SPP, etc.
SysexStartsOrContinues = 4
SysEx starts or continues.
SystemCommon1Byte = 5
Single-byte System Common Message or SysEx ends with following single byte.
SysexEnds2Bytes = 6
SysEx ends with following two bytes.
SysexEnds3Bytes = 7
SysEx ends with following three bytes.
NoteOff = 8
Note-off.
NoteOn = 9
Note-on.
PolyKeyPress = 10
Poly-KeyPress.
ControlChange = 11
Control Change.
ProgramChange = 12
Program Change.
ChannelPressure = 13
Channel Pressure.
PitchBendChange = 14
PitchBend Change.
SingleByte = 15
Single Byte.
Implementations§
Source§impl CodeIndexNumber
impl CodeIndexNumber
Sourcepub fn try_from_payload(payload: &[u8]) -> Result<Self, UsbMidiEventPacketError>
pub fn try_from_payload(payload: &[u8]) -> Result<Self, UsbMidiEventPacketError>
Creates a new number from a MIDI event payload.
The detection is based on the content and ignores the slice length.
Sourcepub fn payload_size(&self) -> usize
pub fn payload_size(&self) -> usize
Returns the size of the MIDI_x event payload in bytes.
Trait Implementations§
Source§impl Clone for CodeIndexNumber
impl Clone for CodeIndexNumber
Source§fn clone(&self) -> CodeIndexNumber
fn clone(&self) -> CodeIndexNumber
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more