Enum midi_control::message::MidiMessage
source · pub enum MidiMessage {
Invalid,
NoteOn(Channel, KeyEvent),
NoteOff(Channel, KeyEvent),
PolyKeyPressure(Channel, KeyEvent),
ControlChange(Channel, ControlEvent),
ProgramChange(Channel, u8),
ChannelPressure(Channel, u8),
PitchBend(Channel, u8, u8),
SysEx(SysExEvent),
}
Expand description
MIDI messages are what is being sent or received on the MIDI system
Variants§
Invalid
We don’t know that message.
NoteOn(Channel, KeyEvent)
Note on.
NoteOff(Channel, KeyEvent)
Note off.
PolyKeyPressure(Channel, KeyEvent)
Pressure for notes (aftertouch).
ControlChange(Channel, ControlEvent)
Control value changed.
ProgramChange(Channel, u8)
Program change.
ChannelPressure(Channel, u8)
Channel pressure.
PitchBend(Channel, u8, u8)
Pitch bending. LSB and MSB of the change.
SysEx(SysExEvent)
System extension event.
Implementations§
source§impl MidiMessage
impl MidiMessage
sourcepub fn get_channel(&self) -> Channel
pub fn get_channel(&self) -> Channel
Return the channel of the MIDI command This is a convenience helper to avoid having to destructure. Note: a SysEx message doesn’t have a channel.
Trait Implementations§
source§impl Debug for MidiMessage
impl Debug for MidiMessage
source§impl From<&[u8]> for MidiMessage
impl From<&[u8]> for MidiMessage
source§fn from(data: &[u8]) -> MidiMessage
fn from(data: &[u8]) -> MidiMessage
Create a MidiMessage from raw data as received from the MIDI driver.
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 ==
.