#[non_exhaustive]pub enum Message {
NoteOff {
channel: u8,
key: u8,
velocity: u8,
},
NoteOn {
channel: u8,
key: u8,
velocity: u8,
},
PolyPressure {
channel: u8,
key: u8,
pressure: u8,
},
ControlChange {
channel: u8,
controller: u8,
value: u8,
},
ProgramChange {
channel: u8,
program: u8,
},
ChannelPressure {
channel: u8,
pressure: u8,
},
PitchBend {
channel: u8,
value: u16,
},
}Expand description
A decoded channel message. Channels are 0..=15; data values are 7-bit except the 14-bit pitch bend (8192 is the center).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
NoteOff
Ends a MIDI note; velocity is release velocity.
Fields
NoteOn
Starts a MIDI note.
Fields
PolyPressure
Changes pressure for a channel/key pair.
Fields
ControlChange
Changes a MIDI controller value.
Fields
ProgramChange
Selects a MIDI program.
ChannelPressure
Changes pressure for every note on the channel.
PitchBend
Changes the channel’s 14-bit pitch-bend value.
Trait Implementations§
impl Copy for Message
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Forget for Message
impl Freeze for Message
impl Move for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more