pub enum MidiEvent {
NoteOn {
channel: u8,
key: u8,
vel: u8,
},
NoteOff {
channel: u8,
key: u8,
},
ControlChange {
channel: u8,
ctrl: u8,
value: u8,
},
AllNotesOff {
channel: u8,
},
AllSoundOff {
channel: u8,
},
PitchBend {
channel: u8,
value: u16,
},
ProgramChange {
channel: u8,
program_id: u8,
},
ChannelPressure {
channel: u8,
value: u8,
},
PolyphonicKeyPressure {
channel: u8,
key: u8,
value: u8,
},
SystemReset,
}Variants§
NoteOn
Send a noteon message.
NoteOff
Send a noteoff message.
ControlChange
Send a control change message.
AllNotesOff
AllSoundOff
PitchBend
Send a pitch bend message.
ProgramChange
Send a program change message.
ChannelPressure
Set channel pressure
PolyphonicKeyPressure
Set key pressure (aftertouch)
SystemReset
Send a reset.
A reset turns all the notes off and resets the controller values.
Purpose: Respond to the MIDI command ‘system reset’ (0xFF, big red ‘panic’ button)
Implementations§
Trait Implementations§
impl Copy for MidiEvent
impl Eq for MidiEvent
impl StructuralPartialEq for MidiEvent
Auto Trait Implementations§
impl Freeze for MidiEvent
impl RefUnwindSafe for MidiEvent
impl Send for MidiEvent
impl Sync for MidiEvent
impl Unpin for MidiEvent
impl UnwindSafe for MidiEvent
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