pub enum Division {
TicksPerQuarterNote(u16),
TimeCode {
frames_per_second: TimeCodeType,
ticks_per_frame: u8,
},
}
Expand description
The division of a Standard Midi File, which specifies the meaning of the delta times in the file
Variants§
TicksPerQuarterNote(u16)
Metrical time. Number of “ticks” per quarter note.
TimeCode
Time code based time.
Implementations§
source§impl Division
impl Division
sourcepub fn beat_or_frame_to_tick(&self, beat_or_frame: f32) -> u32
pub fn beat_or_frame_to_tick(&self, beat_or_frame: f32) -> u32
Convert a beat or frame to the number of “ticks” in a file with this division.
sourcepub fn ticks_to_beats_or_frames(&self, ticks: u32) -> f32
pub fn ticks_to_beats_or_frames(&self, ticks: u32) -> f32
Convert a number of file “ticks” to a beat or frame in a file with this division.
Trait Implementations§
source§impl PartialEq for Division
impl PartialEq for Division
impl Copy for Division
impl StructuralPartialEq for Division
Auto Trait Implementations§
impl Freeze for Division
impl RefUnwindSafe for Division
impl Send for Division
impl Sync for Division
impl Unpin for Division
impl UnwindSafe for Division
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