[][src]Enum midi_control::message::MidiMessage

pub enum MidiMessage {
    Invalid,
    NoteOn(ChannelKeyEvent),
    NoteOff(ChannelKeyEvent),
    PolyKeyPressure(ChannelKeyEvent),
    ControlChange(ChannelControlEvent),
    ProgramChange(Channelu8),
    ChannelPressure(Channelu8),
    PitchBend(Channelu8u8),
    SysEx(SysExEvent),
}

MIDI messages are what is being sent or received on the MIDI system

Variants

Invalid

We don't know that message.

NoteOn(ChannelKeyEvent)

Note on.

NoteOff(ChannelKeyEvent)

Note off.

PolyKeyPressure(ChannelKeyEvent)

Pressure for notes (aftertouch).

ControlChange(ChannelControlEvent)

Control value changed.

ProgramChange(Channelu8)

Program change.

ChannelPressure(Channelu8)

Channel pressure.

PitchBend(Channelu8u8)

Pitch bending. LSB and MSB of the change.

SysEx(SysExEvent)

System extension event.

Implementations

impl MidiMessage[src]

pub fn get_channel(&self) -> Channel[src]

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

impl Debug for MidiMessage[src]

impl<'_> From<&'_ [u8]> for MidiMessage[src]

fn from(data: &[u8]) -> MidiMessage[src]

Create a MidiMessage from raw data as received from the MIDI driver.

impl Into<Vec<u8>> for MidiMessage[src]

fn into(self) -> Vec<u8>[src]

Convert the MidiMessage into a raw buffer suited to be sent, to the MIDI device. An empty vector mean nothing could be made.

impl PartialEq<MidiMessage> for MidiMessage[src]

impl StructuralPartialEq for MidiMessage[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.