pub struct SmfFile {
pub format: SmfFormat,
pub tpq: u32,
pub tracks: Vec<SmfTrack>,
}Expand description
A parsed Standard MIDI File: its format, resolution, and tracks.
Fields§
§format: SmfFormatHeader format field.
tpq: u32Resolution in ticks per quarter note.
tracks: Vec<SmfTrack>Tracks in file order.
Implementations§
Source§impl SmfFile
impl SmfFile
Sourcepub fn canonicalize(&mut self)
pub fn canonicalize(&mut self)
Sorts every track into canonical order and ensures each ends with an end-of-track meta event.
Sourcepub fn merge_cursor(&self) -> SmfMergeCursor<'_> ⓘ
pub fn merge_cursor(&self) -> SmfMergeCursor<'_> ⓘ
Returns a cursor that merges all tracks into one time-ordered stream.
Sourcepub fn merged_events(&self) -> Vec<TrackedMidiEvent>
pub fn merged_events(&self) -> Vec<TrackedMidiEvent>
Collects every track’s events into a single time-ordered, track-tagged vector.
Trait Implementations§
impl Eq for SmfFile
impl StructuralPartialEq for SmfFile
Auto Trait Implementations§
impl Freeze for SmfFile
impl RefUnwindSafe for SmfFile
impl Send for SmfFile
impl Sync for SmfFile
impl Unpin for SmfFile
impl UnsafeUnpin for SmfFile
impl UnwindSafe for SmfFile
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