Enum ghakuf::messages::MidiEvent [] [src]

pub enum MidiEvent {
    NoteOff {
        ch: u8,
        note: u8,
        velocity: u8,
    },
    NoteOn {
        ch: u8,
        note: u8,
        velocity: u8,
    },
    PolyphonicKeyPressure {
        ch: u8,
        note: u8,
        velocity: u8,
    },
    ControlChange {
        ch: u8,
        control: u8,
        data: u8,
    },
    ProgramChange {
        ch: u8,
        program: u8,
    },
    ChannelPressure {
        ch: u8,
        pressure: u8,
    },
    PitchBendChange {
        ch: u8,
        data: i16,
    },
    Unknown {
        ch: u8,
    },
}

An enum representing Midi event of SMF.

Examples

use ghakuf::messages::{MessageTool, MidiEvent};

let event: MidiEvent = MidiEvent::NoteOff { ch: 0x04, note: 0x02, velocity: 0x00 };
assert_eq!(event.binary(), [0x84, 0x02, 0x00]);

Variants

Fields of NoteOff

Fields of NoteOn

Fields of PolyphonicKeyPressure

Fields of ControlChange

Fields of ProgramChange

Fields of ChannelPressure

Fields of PitchBendChange

Fields of Unknown

Trait Implementations

impl PartialEq for MidiEvent
[src]

[src]

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

[src]

This method tests for !=.

impl Clone for MidiEvent
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for MidiEvent
[src]

[src]

Formats the value using the given formatter.

impl MessageTool for MidiEvent
[src]

[src]

Returns message's binary array for SMF. Read more

[src]

Returns length of message's binary array for SMF. Read more

[src]

Returns message's status byte for SMF. Read more

impl Display for MidiEvent
[src]

[src]

Formats the value using the given formatter. Read more