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
NoteOff
Fields of NoteOff
ch: u8 | |
note: u8 | |
velocity: u8 |
NoteOn
Fields of NoteOn
ch: u8 | |
note: u8 | |
velocity: u8 |
PolyphonicKeyPressure
Fields of PolyphonicKeyPressure
ch: u8 | |
note: u8 | |
velocity: u8 |
ControlChange
Fields of ControlChange
ch: u8 | |
control: u8 | |
data: u8 |
ProgramChange
Fields of ProgramChange
ch: u8 | |
program: u8 |
ChannelPressure
Fields of ChannelPressure
ch: u8 | |
pressure: u8 |
PitchBendChange
Fields of PitchBendChange
ch: u8 | |
data: i16 |
Unknown
Fields of Unknown
ch: u8 |
Trait Implementations
impl PartialEq for MidiEvent
[src]
fn eq(&self, __arg_0: &MidiEvent) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &MidiEvent) -> bool
[src]
This method tests for !=
.
impl Clone for MidiEvent
[src]
fn clone(&self) -> MidiEvent
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for MidiEvent
[src]
impl MessageTool for MidiEvent
[src]
fn binary(&self) -> Vec<u8>
[src]
Returns message's binary array for SMF. Read more
fn len(&self) -> usize
[src]
Returns length of message's binary array for SMF. Read more
fn status_byte(&self) -> u8
[src]
Returns message's status byte for SMF. Read more