pub struct TempoMap { /* private fields */ }Expand description
Tempo map: tempo changes across a session.
Implementations§
Source§impl TempoMap
impl TempoMap
Sourcepub fn add_marking(&mut self, beat: f64, bpm: f64, label: Option<String>)
pub fn add_marking(&mut self, beat: f64, bpm: f64, label: Option<String>)
Add a tempo marking at a given beat.
Sourcepub fn bpm_at_beat(&self, beat: f64) -> f64
pub fn bpm_at_beat(&self, beat: f64) -> f64
Look up the BPM at a given beat position.
Sourcepub fn total_beats(&self) -> f64
pub fn total_beats(&self) -> f64
Total beats in the map.
Sourcepub fn entry_count(&self) -> usize
pub fn entry_count(&self) -> usize
Number of tempo entries.
Sourcepub fn entries(&self) -> &[TempoMapEntry]
pub fn entries(&self) -> &[TempoMapEntry]
Get all entries.
Sourcepub fn total_duration(&self) -> Duration
pub fn total_duration(&self) -> Duration
Compute the total duration of the map at the given tempos.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TempoMap
impl RefUnwindSafe for TempoMap
impl Send for TempoMap
impl Sync for TempoMap
impl Unpin for TempoMap
impl UnsafeUnpin for TempoMap
impl UnwindSafe for TempoMap
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