Enum midly::MidiMessage
source · 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
Fields
Start playing a note.
Aftertouch
Modify the velocity of a note after it has been played.
Controller
Fields
Modify the value of a MIDI controller.
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 copy 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<MidiMessage> for MidiMessage
impl PartialEq<MidiMessage> for MidiMessage
source§fn eq(&self, other: &MidiMessage) -> bool
fn eq(&self, other: &MidiMessage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.