pub enum Message {
NoteOff(Channel, Note, U7),
NoteOn(Channel, Note, U7),
PolyphonicAftertouch(Channel, Note, U7),
ProgramChange(Channel, U7),
ChannelAftertouch(Channel, U7),
PitchWheelChange(Channel, U7, U7),
ControlChange(Channel, ControlFunction, U7),
}Expand description
Represents midi messages.
Note: not current exhaustive and SysEx messages end up being a confusing case. So are currently note implemented they are sort-of unbounded
Variants§
NoteOff(Channel, Note, U7)
Note On message.
NoteOn(Channel, Note, U7)
Note Off message.
PolyphonicAftertouch(Channel, Note, U7)
Polyphonic aftertouch (poly-pressure) message.
ProgramChange(Channel, U7)
Program change message.
ChannelAftertouch(Channel, U7)
Channel aftertouch message.
PitchWheelChange(Channel, U7, U7)
Pitchwheel message.
ControlChange(Channel, ControlFunction, U7)
Control Change (CC) message.
Implementations§
Source§impl Message
impl Message
Sourcepub fn into_packet(self, cable: CableNumber) -> UsbMidiEventPacket
pub fn into_packet(self, cable: CableNumber) -> UsbMidiEventPacket
Create a packet from the message.
Sourcepub fn code_index_number(&self) -> CodeIndexNumber
pub fn code_index_number(&self) -> CodeIndexNumber
Returns the code index number for a message.
Trait Implementations§
Source§impl TryFrom<&UsbMidiEventPacket> for Message
impl TryFrom<&UsbMidiEventPacket> for Message
Source§type Error = UsbMidiEventPacketError
type Error = UsbMidiEventPacketError
The type returned in the event of a conversion error.
impl Eq for Message
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin 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