pub enum MidiMessage {
NoteOff {
key: u7,
vel: u7,
},
NoteOn {
key: u7,
vel: u7,
},
Aftertouch {
key: u7,
vel: u7,
},
Controller {
controller: u7,
value: u7,
},
ProgramChange {
program: u7,
},
ChannelAftertouch {
vel: u7,
},
PitchBend {
bend: PitchBend,
},
}Expand description
Represents a MIDI message, usually associated to a MIDI channel.
If you wish to parse a MIDI message from a slice of raw MIDI bytes, use the
LiveEvent::parse method instead and ignore all
variants except for LiveEvent::Midi.
Variants§
NoteOff
Stop playing a note.
NoteOn
Start playing a note.
Fields
Aftertouch
Modify the velocity of a note after it has been played.
Controller
Modify the value of a MIDI controller.
Fields
ProgramChange
Change the program (also known as instrument) for a channel.
ChannelAftertouch
Change the note velocity of a whole channel at once, without starting new notes.
PitchBend
Set the pitch bend value for the entire channel.
Trait Implementations§
Source§impl Clone for MidiMessage
impl Clone for MidiMessage
Source§fn clone(&self) -> MidiMessage
fn clone(&self) -> MidiMessage
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for MidiMessage
impl Debug for MidiMessage
Source§impl Hash for MidiMessage
impl Hash for MidiMessage
Source§impl PartialEq for MidiMessage
impl PartialEq for MidiMessage
impl Copy for MidiMessage
impl Eq for MidiMessage
impl StructuralPartialEq for MidiMessage
Auto Trait Implementations§
impl Freeze for MidiMessage
impl RefUnwindSafe for MidiMessage
impl Send for MidiMessage
impl Sync for MidiMessage
impl Unpin for MidiMessage
impl UnwindSafe for MidiMessage
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more