pub struct TempoMarking { /* private fields */ }Expand description
A tempo marking with BPM and a “human feel” factor.
Rather than rigid metronomic timing, TempoMarking introduces slight
variance around the target BPM, simulating how human musicians (and
well-tuned agents) naturally ebb and flow around a target pace.
Implementations§
Source§impl TempoMarking
impl TempoMarking
Sourcepub fn labeled(bpm: f64, feel: f64, label: impl Into<String>) -> Self
pub fn labeled(bpm: f64, feel: f64, label: impl Into<String>) -> Self
Create a tempo marking with a human-readable label.
Sourcepub fn beat_duration(&self) -> Duration
pub fn beat_duration(&self) -> Duration
Duration of one beat at the base BPM.
Sourcepub fn beat_with_feel(&self, variation: f64) -> Duration
pub fn beat_with_feel(&self, variation: f64) -> Duration
Duration of one beat with feel applied (± variance).
The variation parameter should be in [-1.0, 1.0] and is scaled by feel.
Trait Implementations§
Source§impl Clone for TempoMarking
impl Clone for TempoMarking
Source§fn clone(&self) -> TempoMarking
fn clone(&self) -> TempoMarking
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TempoMarking
impl Debug for TempoMarking
Source§impl PartialEq for TempoMarking
impl PartialEq for TempoMarking
Source§fn eq(&self, other: &TempoMarking) -> bool
fn eq(&self, other: &TempoMarking) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TempoMarking
Auto Trait Implementations§
impl Freeze for TempoMarking
impl RefUnwindSafe for TempoMarking
impl Send for TempoMarking
impl Sync for TempoMarking
impl Unpin for TempoMarking
impl UnsafeUnpin for TempoMarking
impl UnwindSafe for TempoMarking
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