pub enum Event {
Tempo(u32),
TimeSignature(u8, u8, u8, u8),
KeySignature(i8, bool),
Midi(MidiEvent),
}Expand description
Represents a single MIDI event.
Variants§
Tempo(u32)
Represents a tempo change message.
The wrapped u32 represents microseconds per beat.
TimeSignature(u8, u8, u8, u8)
In order of the MIDI specification, numerator, denominator, MIDI clocks per click, 32nd notes per quarter.
KeySignature(i8, bool)
As in the MIDI specification, negative numbers indicate number of flats and positive numbers indicate number of sharps. false indicates a major scale, true indicates a minor scale.
Midi(MidiEvent)
Represents a MIDI event.
Trait Implementations§
Source§impl TryFrom<TrackEventKind<'_>> for Event
impl TryFrom<TrackEventKind<'_>> for Event
Source§fn try_from(event: TrackEventKind<'_>) -> Result<Self, Self::Error>
fn try_from(event: TrackEventKind<'_>) -> Result<Self, Self::Error>
Tries to create Self from a TrackEventKind.
§Errors
Will return an error if the given TrackEventKind is not compatible.
impl Copy for Event
impl Eq for Event
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> 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
Mutably borrows from an owned value. Read more