Enum dimi::midi::Event[][src]

pub enum Event {
    Disconnect,
    NoteOff {
        chan: u8,
        note: Note,
        value: i8,
    },
    NoteOn {
        chan: u8,
        note: Note,
        value: i8,
    },
    NoteTouch {
        chan: u8,
        note: Note,
        value: i8,
    },
    Control {
        chan: u8,
        message: Control,
    },
    Instrument {
        chan: u8,
        patch: [i8; 2],
    },
    Pressure {
        chan: u8,
        value: i8,
    },
    Bend {
        chan: u8,
        lsb: i8,
        msb: i8,
    },
    System {
        message: Message,
    },
}
Expand description

A decoded MIDI Event

Variants

Disconnect

MIDI instrument was disconnected.

NoteOff

Note stopped

Fields of NoteOff

chan: u8

Channel 0-15

note: Note

Which note was stopped

value: i8

Velocity of the note 0-127

NoteOn

Note playing

Fields of NoteOn

chan: u8

Channel 0-15

note: Note

Which note was played

value: i8

Velocity of the note 0-127

NoteTouch

Note aftertouch parameter change

Fields of NoteTouch

chan: u8

Channel 0-15

note: Note

Which note was played

value: i8

Touch parameter value 0-127.

Control

Control Change (Continous Controller)

Fields of Control

chan: u8

Channel 0-15

message: Control

Which control change message.

Instrument

Patch Change

Fields of Instrument

chan: u8

Channel 0-15

patch: [i8; 2]

Instrument Patch ID ([0x00-0x7F, 0x00-0x7F])

Pressure

Channel Pressure

Fields of Pressure

chan: u8

Channel 0-15

value: i8

Pressure parameter value 0-127.

Bend

Pitch-Bend

Fields of Bend

chan: u8

Channel 0-15

lsb: i8

FIXME: what is LSB

msb: i8

FIXME: what is MSB

System

System Message

Fields of System

message: Message

One of the MIDI system messages.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.