pub enum Event {
Show 23 variants
NoteOn(NoteOnEvent),
NoteOff(NoteOffEvent),
PolyphonicKeyPressure(Box<PolyphonicKeyPressureEvent>),
ControlChange(Box<ControlChangeEvent>),
ProgramChange(Box<ProgramChangeEvent>),
ChannelPressure(Box<ChannelPressureEvent>),
PitchWheelChange(Box<PitchWheelChangeEvent>),
SystemExclusiveMessage(Box<SystemExclusiveMessageEvent>),
Undefined(Box<UndefinedEvent>),
SongPositionPointer(Box<SongPositionPointerEvent>),
SongSelect(Box<SongSelectEvent>),
TuneRequest(Box<TuneRequestEvent>),
EndOfExclusive(Box<EndOfExclusiveEvent>),
TrackStart(Box<TrackStartEvent>),
Text(Box<TextEvent>),
UnknownMeta(Box<UnknownMetaEvent>),
Color(Box<ColorEvent>),
ChannelPrefix(Box<ChannelPrefixEvent>),
MIDIPort(Box<MIDIPortEvent>),
Tempo(Box<TempoEvent>),
SMPTEOffset(Box<SMPTEOffsetEvent>),
TimeSignature(Box<TimeSignatureEvent>),
KeySignature(Box<KeySignatureEvent>),
}Variants§
NoteOn(NoteOnEvent)
NoteOff(NoteOffEvent)
PolyphonicKeyPressure(Box<PolyphonicKeyPressureEvent>)
ControlChange(Box<ControlChangeEvent>)
ProgramChange(Box<ProgramChangeEvent>)
ChannelPressure(Box<ChannelPressureEvent>)
PitchWheelChange(Box<PitchWheelChangeEvent>)
SystemExclusiveMessage(Box<SystemExclusiveMessageEvent>)
Undefined(Box<UndefinedEvent>)
SongPositionPointer(Box<SongPositionPointerEvent>)
SongSelect(Box<SongSelectEvent>)
TuneRequest(Box<TuneRequestEvent>)
EndOfExclusive(Box<EndOfExclusiveEvent>)
TrackStart(Box<TrackStartEvent>)
Text(Box<TextEvent>)
UnknownMeta(Box<UnknownMetaEvent>)
Color(Box<ColorEvent>)
ChannelPrefix(Box<ChannelPrefixEvent>)
MIDIPort(Box<MIDIPortEvent>)
Tempo(Box<TempoEvent>)
SMPTEOffset(Box<SMPTEOffsetEvent>)
TimeSignature(Box<TimeSignatureEvent>)
KeySignature(Box<KeySignatureEvent>)
Implementations§
Source§impl Event
impl Event
Sourcepub fn new_note_on_event(channel: u8, key: u8, velocity: u8) -> Event
pub fn new_note_on_event(channel: u8, key: u8, velocity: u8) -> Event
Creates a new NoteOnEvent wrapped in Event::NoteOn.
Sourcepub fn new_delta_note_on_event<D: MIDINum>(
delta: D,
channel: u8,
key: u8,
velocity: u8,
) -> Delta<D, Event>
pub fn new_delta_note_on_event<D: MIDINum>( delta: D, channel: u8, key: u8, velocity: u8, ) -> Delta<D, Event>
Creates a new NoteOnEvent wrapped in Event::NoteOn.
Source§impl Event
impl Event
Sourcepub fn new_note_off_event(channel: u8, key: u8) -> Event
pub fn new_note_off_event(channel: u8, key: u8) -> Event
Creates a new NoteOffEvent wrapped in Event::NoteOff.
Sourcepub fn new_delta_note_off_event<D: MIDINum>(
delta: D,
channel: u8,
key: u8,
) -> Delta<D, Event>
pub fn new_delta_note_off_event<D: MIDINum>( delta: D, channel: u8, key: u8, ) -> Delta<D, Event>
Creates a new NoteOffEvent wrapped in Event::NoteOff.
Source§impl Event
impl Event
Sourcepub fn new_polyphonic_key_pressure_event(
channel: u8,
key: u8,
velocity: u8,
) -> Event
pub fn new_polyphonic_key_pressure_event( channel: u8, key: u8, velocity: u8, ) -> Event
Creates a new PolyphonicKeyPressureEvent wrapped in Event::PolyphonicKeyPressure.
Sourcepub fn new_delta_polyphonic_key_pressure_event<D: MIDINum>(
delta: D,
channel: u8,
key: u8,
velocity: u8,
) -> Delta<D, Event>
pub fn new_delta_polyphonic_key_pressure_event<D: MIDINum>( delta: D, channel: u8, key: u8, velocity: u8, ) -> Delta<D, Event>
Creates a new PolyphonicKeyPressureEvent wrapped in Event::PolyphonicKeyPressure.
Source§impl Event
impl Event
Sourcepub fn new_control_change_event(channel: u8, controller: u8, value: u8) -> Event
pub fn new_control_change_event(channel: u8, controller: u8, value: u8) -> Event
Creates a new ControlChangeEvent wrapped in Event::ControlChange.
Sourcepub fn new_delta_control_change_event<D: MIDINum>(
delta: D,
channel: u8,
controller: u8,
value: u8,
) -> Delta<D, Event>
pub fn new_delta_control_change_event<D: MIDINum>( delta: D, channel: u8, controller: u8, value: u8, ) -> Delta<D, Event>
Creates a new ControlChangeEvent wrapped in Event::ControlChange.
Source§impl Event
impl Event
Sourcepub fn new_program_change_event(channel: u8, program: u8) -> Event
pub fn new_program_change_event(channel: u8, program: u8) -> Event
Creates a new ProgramChangeEvent wrapped in Event::ProgramChange.
Sourcepub fn new_delta_program_change_event<D: MIDINum>(
delta: D,
channel: u8,
program: u8,
) -> Delta<D, Event>
pub fn new_delta_program_change_event<D: MIDINum>( delta: D, channel: u8, program: u8, ) -> Delta<D, Event>
Creates a new ProgramChangeEvent wrapped in Event::ProgramChange.
Source§impl Event
impl Event
Sourcepub fn new_channel_pressure_event(channel: u8, pressure: u8) -> Event
pub fn new_channel_pressure_event(channel: u8, pressure: u8) -> Event
Creates a new ChannelPressureEvent wrapped in Event::ChannelPressure.
Sourcepub fn new_delta_channel_pressure_event<D: MIDINum>(
delta: D,
channel: u8,
pressure: u8,
) -> Delta<D, Event>
pub fn new_delta_channel_pressure_event<D: MIDINum>( delta: D, channel: u8, pressure: u8, ) -> Delta<D, Event>
Creates a new ChannelPressureEvent wrapped in Event::ChannelPressure.
Source§impl Event
impl Event
Sourcepub fn new_pitch_wheel_change_event(channel: u8, pitch: i16) -> Event
pub fn new_pitch_wheel_change_event(channel: u8, pitch: i16) -> Event
Creates a new PitchWheelChangeEvent wrapped in Event::PitchWheelChange.
Sourcepub fn new_delta_pitch_wheel_change_event<D: MIDINum>(
delta: D,
channel: u8,
pitch: i16,
) -> Delta<D, Event>
pub fn new_delta_pitch_wheel_change_event<D: MIDINum>( delta: D, channel: u8, pitch: i16, ) -> Delta<D, Event>
Creates a new PitchWheelChangeEvent wrapped in Event::PitchWheelChange.
Source§impl Event
impl Event
Sourcepub fn new_system_exclusive_message_event(data: Vec<u8>) -> Event
pub fn new_system_exclusive_message_event(data: Vec<u8>) -> Event
Creates a new SystemExclusiveMessageEvent wrapped in Event::SystemExclusiveMessage.
Sourcepub fn new_delta_system_exclusive_message_event<D: MIDINum>(
delta: D,
data: Vec<u8>,
) -> Delta<D, Event>
pub fn new_delta_system_exclusive_message_event<D: MIDINum>( delta: D, data: Vec<u8>, ) -> Delta<D, Event>
Creates a new SystemExclusiveMessageEvent wrapped in Event::SystemExclusiveMessage.
Source§impl Event
impl Event
Sourcepub fn new_undefined_event(event: u8) -> Event
pub fn new_undefined_event(event: u8) -> Event
Creates a new UndefinedEvent wrapped in Event::Undefined.
Sourcepub fn new_delta_undefined_event<D: MIDINum>(
delta: D,
event: u8,
) -> Delta<D, Event>
pub fn new_delta_undefined_event<D: MIDINum>( delta: D, event: u8, ) -> Delta<D, Event>
Creates a new UndefinedEvent wrapped in Event::Undefined.
Source§impl Event
impl Event
Sourcepub fn new_song_position_pointer_event(position: u16) -> Event
pub fn new_song_position_pointer_event(position: u16) -> Event
Creates a new SongPositionPointerEvent wrapped in Event::SongPositionPointer.
Sourcepub fn new_delta_song_position_pointer_event<D: MIDINum>(
delta: D,
position: u16,
) -> Delta<D, Event>
pub fn new_delta_song_position_pointer_event<D: MIDINum>( delta: D, position: u16, ) -> Delta<D, Event>
Creates a new SongPositionPointerEvent wrapped in Event::SongPositionPointer.
Source§impl Event
impl Event
Sourcepub fn new_song_select_event(song: u8) -> Event
pub fn new_song_select_event(song: u8) -> Event
Creates a new SongSelectEvent wrapped in Event::SongSelect.
Sourcepub fn new_delta_song_select_event<D: MIDINum>(
delta: D,
song: u8,
) -> Delta<D, Event>
pub fn new_delta_song_select_event<D: MIDINum>( delta: D, song: u8, ) -> Delta<D, Event>
Creates a new SongSelectEvent wrapped in Event::SongSelect.
Source§impl Event
impl Event
Sourcepub fn new_tune_request_event() -> Event
pub fn new_tune_request_event() -> Event
Creates a new TuneRequestEvent wrapped in Event::TuneRequest.
Sourcepub fn new_delta_tune_request_event<D: MIDINum>(delta: D) -> Delta<D, Event>
pub fn new_delta_tune_request_event<D: MIDINum>(delta: D) -> Delta<D, Event>
Creates a new TuneRequestEvent wrapped in Event::TuneRequest.
Source§impl Event
impl Event
Sourcepub fn new_end_of_exclusive_event() -> Event
pub fn new_end_of_exclusive_event() -> Event
Creates a new EndOfExclusiveEvent wrapped in Event::EndOfExclusive.
Sourcepub fn new_delta_end_of_exclusive_event<D: MIDINum>(delta: D) -> Delta<D, Event>
pub fn new_delta_end_of_exclusive_event<D: MIDINum>(delta: D) -> Delta<D, Event>
Creates a new EndOfExclusiveEvent wrapped in Event::EndOfExclusive.
Source§impl Event
impl Event
Sourcepub fn new_track_start_event() -> Event
pub fn new_track_start_event() -> Event
Creates a new TrackStartEvent wrapped in Event::TrackStart.
Sourcepub fn new_delta_track_start_event<D: MIDINum>(delta: D) -> Delta<D, Event>
pub fn new_delta_track_start_event<D: MIDINum>(delta: D) -> Delta<D, Event>
Creates a new TrackStartEvent wrapped in Event::TrackStart.
Source§impl Event
impl Event
Sourcepub fn new_text_event(kind: TextEventKind, bytes: Vec<u8>) -> Event
pub fn new_text_event(kind: TextEventKind, bytes: Vec<u8>) -> Event
Creates a new TextEvent wrapped in Event::Text.
Sourcepub fn new_delta_text_event<D: MIDINum>(
delta: D,
kind: TextEventKind,
bytes: Vec<u8>,
) -> Delta<D, Event>
pub fn new_delta_text_event<D: MIDINum>( delta: D, kind: TextEventKind, bytes: Vec<u8>, ) -> Delta<D, Event>
Creates a new TextEvent wrapped in Event::Text.
Source§impl Event
impl Event
Sourcepub fn new_unknown_meta_event(kind: u8, bytes: Vec<u8>) -> Event
pub fn new_unknown_meta_event(kind: u8, bytes: Vec<u8>) -> Event
Creates a new UnknownMetaEvent wrapped in Event::UnknownMeta.
Sourcepub fn new_delta_unknown_meta_event<D: MIDINum>(
delta: D,
kind: u8,
bytes: Vec<u8>,
) -> Delta<D, Event>
pub fn new_delta_unknown_meta_event<D: MIDINum>( delta: D, kind: u8, bytes: Vec<u8>, ) -> Delta<D, Event>
Creates a new UnknownMetaEvent wrapped in Event::UnknownMeta.
Source§impl Event
impl Event
Sourcepub fn new_color_event(
channel: u8,
col: MIDIColor,
col2: Option<MIDIColor>,
) -> Event
pub fn new_color_event( channel: u8, col: MIDIColor, col2: Option<MIDIColor>, ) -> Event
Creates a new ColorEvent wrapped in Event::Color.
Sourcepub fn new_delta_color_event<D: MIDINum>(
delta: D,
channel: u8,
col: MIDIColor,
col2: Option<MIDIColor>,
) -> Delta<D, Event>
pub fn new_delta_color_event<D: MIDINum>( delta: D, channel: u8, col: MIDIColor, col2: Option<MIDIColor>, ) -> Delta<D, Event>
Creates a new ColorEvent wrapped in Event::Color.
Source§impl Event
impl Event
Sourcepub fn new_channel_prefix_event(channel: u8) -> Event
pub fn new_channel_prefix_event(channel: u8) -> Event
Creates a new ChannelPrefixEvent wrapped in Event::ChannelPrefix.
Sourcepub fn new_delta_channel_prefix_event<D: MIDINum>(
delta: D,
channel: u8,
) -> Delta<D, Event>
pub fn new_delta_channel_prefix_event<D: MIDINum>( delta: D, channel: u8, ) -> Delta<D, Event>
Creates a new ChannelPrefixEvent wrapped in Event::ChannelPrefix.
Source§impl Event
impl Event
Sourcepub fn new_midi_port_event(channel: u8) -> Event
pub fn new_midi_port_event(channel: u8) -> Event
Creates a new MIDIPortEvent wrapped in Event::MIDIPort.
Sourcepub fn new_delta_midi_port_event<D: MIDINum>(
delta: D,
channel: u8,
) -> Delta<D, Event>
pub fn new_delta_midi_port_event<D: MIDINum>( delta: D, channel: u8, ) -> Delta<D, Event>
Creates a new MIDIPortEvent wrapped in Event::MIDIPort.
Source§impl Event
impl Event
Sourcepub fn new_tempo_event(tempo: u32) -> Event
pub fn new_tempo_event(tempo: u32) -> Event
Creates a new TempoEvent wrapped in Event::Tempo.
Sourcepub fn new_delta_tempo_event<D: MIDINum>(
delta: D,
tempo: u32,
) -> Delta<D, Event>
pub fn new_delta_tempo_event<D: MIDINum>( delta: D, tempo: u32, ) -> Delta<D, Event>
Creates a new TempoEvent wrapped in Event::Tempo.
Source§impl Event
impl Event
Sourcepub fn new_smpte_offset_event(
hours: u8,
minutes: u8,
seconds: u8,
frames: u8,
fractional_frames: u8,
) -> Event
pub fn new_smpte_offset_event( hours: u8, minutes: u8, seconds: u8, frames: u8, fractional_frames: u8, ) -> Event
Creates a new SMPTEOffsetEvent wrapped in Event::SMPTEOffset.
Sourcepub fn new_delta_smpte_offset_event<D: MIDINum>(
delta: D,
hours: u8,
minutes: u8,
seconds: u8,
frames: u8,
fractional_frames: u8,
) -> Delta<D, Event>
pub fn new_delta_smpte_offset_event<D: MIDINum>( delta: D, hours: u8, minutes: u8, seconds: u8, frames: u8, fractional_frames: u8, ) -> Delta<D, Event>
Creates a new SMPTEOffsetEvent wrapped in Event::SMPTEOffset.
Source§impl Event
impl Event
Sourcepub fn new_time_signature_event(
numerator: u8,
denominator: u8,
ticks_per_click: u8,
bb: u8,
) -> Event
pub fn new_time_signature_event( numerator: u8, denominator: u8, ticks_per_click: u8, bb: u8, ) -> Event
Creates a new TimeSignatureEvent wrapped in Event::TimeSignature.
Sourcepub fn new_delta_time_signature_event<D: MIDINum>(
delta: D,
numerator: u8,
denominator: u8,
ticks_per_click: u8,
bb: u8,
) -> Delta<D, Event>
pub fn new_delta_time_signature_event<D: MIDINum>( delta: D, numerator: u8, denominator: u8, ticks_per_click: u8, bb: u8, ) -> Delta<D, Event>
Creates a new TimeSignatureEvent wrapped in Event::TimeSignature.
Source§impl Event
impl Event
Sourcepub fn new_key_signature_event(sf: u8, mi: u8) -> Event
pub fn new_key_signature_event(sf: u8, mi: u8) -> Event
Creates a new KeySignatureEvent wrapped in Event::KeySignature.
Sourcepub fn new_delta_key_signature_event<D: MIDINum>(
delta: D,
sf: u8,
mi: u8,
) -> Delta<D, Event>
pub fn new_delta_key_signature_event<D: MIDINum>( delta: D, sf: u8, mi: u8, ) -> Delta<D, Event>
Creates a new KeySignatureEvent wrapped in Event::KeySignature.
Trait Implementations§
Source§impl BatchTempo for Event
impl BatchTempo for Event
fn inner_tempo(&self) -> Option<u32>
fn without_tempo(self) -> Option<Self>
Source§impl MIDIEventEnum for Event
impl MIDIEventEnum for Event
Source§impl SerializeEvent for Event
impl SerializeEvent for Event
fn serialize_event<T: Write>( &self, buf: &mut T, ) -> Result<usize, MIDIWriteError>
impl StructuralPartialEq for Event
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more