pub enum Data {
Show 18 variants KeyNumber(u8), Velocity(u8), ControllerNumber(u8), ControllerValue(u8), PressureAmount(u8), ProgramNumber(u8), PressureValue(u8), MSB(u8), LSB(u8), ResetAllControllers, LocalControl(u8), AllNotesOff, OmniModeOff, OmniModeOn, MonoModeOn, PolyModeOn, Generic(u8), None,
}
Expand description

Midi data, second and optional third bytes

Variants

KeyNumber(u8)

Velocity(u8)

ControllerNumber(u8)

ControllerValue(u8)

PressureAmount(u8)

ProgramNumber(u8)

PressureValue(u8)

MSB(u8)

LSB(u8)

ResetAllControllers

LocalControl(u8)

AllNotesOff

OmniModeOff

OmniModeOn

MonoModeOn

PolyModeOn

Generic(u8)

None

Trait Implementations

Formats the value using the given formatter. Read more

Conversion from Data::KeyNumber.

Examples

Basic usage:

use mumuse::messages::Data;
use mumuse::music::note::Note;
let kn = Data::KeyNumber(44);
let n = Note::try_from(&kn);

The type returned in the event of a conversion error.

Performs the conversion.

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 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.