Enum rsynth::backend::combined::midly::midly_0_5::TrackEventKind[]

pub enum TrackEventKind<'a> {
    Midi {
        channel: u4,
        message: MidiMessage,
    },
    SysEx(&'a [u8]),
    Escape(&'a [u8]),
    Meta(MetaMessage<'a>),
}

Represents the different kinds of SMF events and their associated data.

It notably does not include the timing of the event; the TrackEvent struct is responsible for this.

Variants

Midi

A message associated to a MIDI channel carrying musical data.

Usually, the bulk of MIDI data is these kind of messages.

Fields of Midi

channel: u4message: MidiMessage
SysEx(&'a [u8])

A System Exclusive message, carrying arbitrary data.

The data bytes included here do not include the implicit 0xF0 prefix.

Usually SysEx events end with an 0xF7 byte, but SysEx events that are split into several small packets may only contain the 0xF7 byte in the last packet fragment.

Escape(&'a [u8])

An escape sequence, intended to send arbitrary data to the MIDI synthesizer.

Meta(MetaMessage<'a>)

A meta-message, giving extra information for correct playback, like tempo, song name, lyrics, etc…

Implementations

impl<'a> TrackEventKind<'a>

pub fn as_live_event(&self) -> Option<LiveEvent<'a>>

Lossy conversion from a track event to a live event.

Only channel MIDI messages and not-split SysEx messages can be converted. Meta messages and arbitrary escapes yield None when converted.

Trait Implementations

impl<'a> Clone for TrackEventKind<'a>

impl<'a> Copy for TrackEventKind<'a>

impl<'a> Debug for TrackEventKind<'a>

impl<'a> Eq for TrackEventKind<'a>

impl<'a> Hash for TrackEventKind<'a>

impl<'a> PartialEq<TrackEventKind<'a>> for TrackEventKind<'a>

impl<'a> StructuralEq for TrackEventKind<'a>

impl<'a> StructuralPartialEq for TrackEventKind<'a>

impl<'a> TryFrom<TrackEventKind<'a>> for RawMidiEvent[src]

type Error = MidlyConversionError

The type returned in the event of a conversion error.

Auto Trait Implementations

impl<'a> RefUnwindSafe for TrackEventKind<'a>

impl<'a> Send for TrackEventKind<'a>

impl<'a> Sync for TrackEventKind<'a>

impl<'a> Unpin for TrackEventKind<'a>

impl<'a> UnwindSafe for TrackEventKind<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 

impl<T> From<T> for T[src]

impl<S> FromSample<S> for S

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> ToSample<U> for T where
    U: FromSample<T>, 

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.