pub struct DynamicTransport { /* private fields */ }Expand description
A musical transport with multiple keyframes of tempo. The tempo immediately jumps from one keyframe to another (the tempo is NOT linearly interpolated between keyframes).
Implementations§
Source§impl DynamicTransport
impl DynamicTransport
Sourcepub fn new(
keyframes: Vec<TransportKeyframe>,
) -> Result<Self, DynamicTransportError>
pub fn new( keyframes: Vec<TransportKeyframe>, ) -> Result<Self, DynamicTransportError>
Construct a new DynamicTransport.
pub fn keyframes(&self) -> &[TransportKeyframe]
pub fn musical_to_seconds( &self, musical: InstantMusical, transport_start: InstantSeconds, speed_multiplier: f64, ) -> InstantSeconds
pub fn musical_to_samples( &self, musical: InstantMusical, transport_start: InstantSamples, speed_multiplier: f64, sample_rate: NonZeroU32, ) -> InstantSamples
pub fn seconds_to_musical( &self, seconds: InstantSeconds, transport_start: InstantSeconds, speed_multiplier: f64, ) -> InstantMusical
pub fn samples_to_musical( &self, sample_time: InstantSamples, transport_start: InstantSamples, speed_multiplier: f64, sample_rate: NonZeroU32, sample_rate_recip: f64, ) -> InstantMusical
pub fn delta_seconds_from( &self, from: InstantMusical, delta_seconds: DurationSeconds, speed_multiplier: f64, ) -> InstantMusical
pub fn transport_start( &self, now: InstantSamples, playhead: InstantMusical, speed_multiplier: f64, sample_rate: NonZeroU32, ) -> InstantSamples
pub fn bpm_at_musical( &self, musical: InstantMusical, speed_multiplier: f64, ) -> f64
pub fn proc_transport_info( &self, frames: usize, playhead: InstantMusical, speed_multiplier: f64, sample_rate: NonZeroU32, ) -> ProcTransportInfo
Trait Implementations§
Source§impl Clone for DynamicTransport
impl Clone for DynamicTransport
Source§fn clone(&self) -> DynamicTransport
fn clone(&self) -> DynamicTransport
Returns a duplicate 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 DynamicTransport
impl Debug for DynamicTransport
Source§impl PartialEq for DynamicTransport
impl PartialEq for DynamicTransport
Auto Trait Implementations§
impl Freeze for DynamicTransport
impl RefUnwindSafe for DynamicTransport
impl Send for DynamicTransport
impl Sync for DynamicTransport
impl Unpin for DynamicTransport
impl UnwindSafe for DynamicTransport
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
Source§impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
impl<F, T> IntoSample<T> for Fwhere
T: FromSample<F>,
fn into_sample(self) -> T
Source§impl<T> TypeData for T
impl<T> TypeData for T
Source§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
Creates a type-erased clone of this value.