Struct midi_msg::TrackEvent
source · pub struct TrackEvent {
pub delta_time: u32,
pub event: MidiMsg,
pub beat_or_frame: f32,
}
Expand description
An event occurring in a track in a Standard Midi File
Fields§
§delta_time: u32
The time since the last event. The meaning of this value is determined by the file header’s Division
.
event: MidiMsg
The actual midi event.
beat_or_frame: f32
Given the file’s Division
, the time in beats or frames at which this event occurs.
When deserializing, this is derived from the delta_time
and the previous event’s beat_or_frame
.
When manually constructing TrackEvent
s (i.e. when not using the MidiFile::extend_track
convenience function), this field can set to any value, as it is not used when serializing the file.
Trait Implementations§
source§impl Clone for TrackEvent
impl Clone for TrackEvent
source§fn clone(&self) -> TrackEvent
fn clone(&self) -> TrackEvent
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for TrackEvent
impl Debug for TrackEvent
source§impl PartialEq for TrackEvent
impl PartialEq for TrackEvent
source§fn eq(&self, other: &TrackEvent) -> bool
fn eq(&self, other: &TrackEvent) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for TrackEvent
Auto Trait Implementations§
impl Freeze for TrackEvent
impl RefUnwindSafe for TrackEvent
impl Send for TrackEvent
impl Sync for TrackEvent
impl Unpin for TrackEvent
impl UnwindSafe for TrackEvent
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