Enum Event

Source
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

Source

pub fn new_note_on_event(channel: u8, key: u8, velocity: u8) -> Event

Creates a new NoteOnEvent wrapped in Event::NoteOn.

Source

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

Source

pub fn new_note_off_event(channel: u8, key: u8) -> Event

Creates a new NoteOffEvent wrapped in Event::NoteOff.

Source

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

Source

pub fn new_polyphonic_key_pressure_event( channel: u8, key: u8, velocity: u8, ) -> Event

Source

pub fn new_delta_polyphonic_key_pressure_event<D: MIDINum>( delta: D, channel: u8, key: u8, velocity: u8, ) -> Delta<D, Event>

Source§

impl Event

Source

pub fn new_control_change_event(channel: u8, controller: u8, value: u8) -> Event

Creates a new ControlChangeEvent wrapped in Event::ControlChange.

Source

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

Source

pub fn new_program_change_event(channel: u8, program: u8) -> Event

Creates a new ProgramChangeEvent wrapped in Event::ProgramChange.

Source

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

Source

pub fn new_channel_pressure_event(channel: u8, pressure: u8) -> Event

Creates a new ChannelPressureEvent wrapped in Event::ChannelPressure.

Source

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

Source

pub fn new_pitch_wheel_change_event(channel: u8, pitch: i16) -> Event

Source

pub fn new_delta_pitch_wheel_change_event<D: MIDINum>( delta: D, channel: u8, pitch: i16, ) -> Delta<D, Event>

Source§

impl Event

Source§

impl Event

Source

pub fn new_undefined_event(event: u8) -> Event

Creates a new UndefinedEvent wrapped in Event::Undefined.

Source

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

Source§

impl Event

Source

pub fn new_song_select_event(song: u8) -> Event

Creates a new SongSelectEvent wrapped in Event::SongSelect.

Source

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

Source§

impl Event

Source§

impl Event

Source

pub fn new_track_start_event() -> Event

Creates a new TrackStartEvent wrapped in Event::TrackStart.

Source

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

Source

pub fn new_text_event(kind: TextEventKind, bytes: Vec<u8>) -> Event

Creates a new TextEvent wrapped in Event::Text.

Source

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

Source

pub fn new_unknown_meta_event(kind: u8, bytes: Vec<u8>) -> Event

Creates a new UnknownMetaEvent wrapped in Event::UnknownMeta.

Source

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

Source

pub fn new_color_event( channel: u8, col: MIDIColor, col2: Option<MIDIColor>, ) -> Event

Creates a new ColorEvent wrapped in Event::Color.

Source

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

Source

pub fn new_channel_prefix_event(channel: u8) -> Event

Creates a new ChannelPrefixEvent wrapped in Event::ChannelPrefix.

Source

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

Source

pub fn new_midi_port_event(channel: u8) -> Event

Creates a new MIDIPortEvent wrapped in Event::MIDIPort.

Source

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

Source

pub fn new_tempo_event(tempo: u32) -> Event

Creates a new TempoEvent wrapped in Event::Tempo.

Source

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

Source

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.

Source

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

Source

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.

Source

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

Source

pub fn new_key_signature_event(sf: u8, mi: u8) -> Event

Creates a new KeySignatureEvent wrapped in Event::KeySignature.

Source

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

Source§

impl Clone for Event

Source§

fn clone(&self) -> Event

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl MIDIEvent for Event

Source§

fn key(&self) -> Option<u8>

Source§

fn key_mut(&mut self) -> Option<&mut u8>

Source§

fn channel(&self) -> Option<u8>

Source§

fn channel_mut(&mut self) -> Option<&mut u8>

Source§

fn as_u32(&self) -> Option<u32>

Source§

impl MIDIEventEnum for Event

Source§

fn as_event(&self) -> &Event

Source§

fn as_event_mut(&mut self) -> &mut Event

Source§

impl PartialEq for Event

Source§

fn eq(&self, other: &Event) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl SerializeEvent for Event

Source§

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 UnwindSafe for Event

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

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

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.