pub enum StretchPolicy {
TempoRatio(Time),
TimeRatio(Time),
FitToDuration(Time),
TimeMap(Vec<TimeMapPoint>),
WarpMarkers(Vec<WarpMarker>),
}Expand description
Strategy for stretching or warping material along the time axis.
Variants§
TempoRatio(Time)
Scale time inversely to a tempo ratio (faster tempo, shorter time).
TimeRatio(Time)
Scale time directly by a time ratio.
FitToDuration(Time)
Scale time so the material fills a target duration.
TimeMap(Vec<TimeMapPoint>)
Warp time through an explicit piecewise-linear map.
WarpMarkers(Vec<WarpMarker>)
Warp time through a set of WarpMarker anchors.
Implementations§
Source§impl StretchPolicy
impl StretchPolicy
Sourcepub fn apply(&self, object: &dyn MusicObject) -> Result<Music, TransformError>
pub fn apply(&self, object: &dyn MusicObject) -> Result<Music, TransformError>
Applies the stretch and returns just the music.
Sourcepub fn apply_report(
&self,
object: &dyn MusicObject,
) -> Result<TransformReport, TransformError>
pub fn apply_report( &self, object: &dyn MusicObject, ) -> Result<TransformReport, TransformError>
Applies the stretch, returning the music and any diagnostics.
Trait Implementations§
Source§impl Clone for StretchPolicy
impl Clone for StretchPolicy
Source§fn clone(&self) -> StretchPolicy
fn clone(&self) -> StretchPolicy
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 StretchPolicy
impl Debug for StretchPolicy
impl Eq for StretchPolicy
Source§impl PartialEq for StretchPolicy
impl PartialEq for StretchPolicy
impl StructuralPartialEq for StretchPolicy
Auto Trait Implementations§
impl Freeze for StretchPolicy
impl RefUnwindSafe for StretchPolicy
impl Send for StretchPolicy
impl Sync for StretchPolicy
impl Unpin for StretchPolicy
impl UnsafeUnpin for StretchPolicy
impl UnwindSafe for StretchPolicy
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