pub struct ParameterAutomation {
pub points: Vec<AutomationPoint>,
pub looping: bool,
}Expand description
Parameter automation data
Fields§
§points: Vec<AutomationPoint>Automation points
looping: boolWhether to loop the automation
Implementations§
Source§impl ParameterAutomation
impl ParameterAutomation
Sourcepub fn with_curve(self, curve: AutomationCurve) -> Self
pub fn with_curve(self, curve: AutomationCurve) -> Self
Set the curve type
Sourcepub fn value_at_time(&self, time: f64) -> Option<f64>
pub fn value_at_time(&self, time: f64) -> Option<f64>
Get value at specific time
Sourcepub fn points_for_block(
&self,
block_start_secs: f64,
frames: usize,
sample_rate: f64,
points_per_block: usize,
) -> Vec<(i32, f64)>
pub fn points_for_block( &self, block_start_secs: f64, frames: usize, sample_rate: f64, points_per_block: usize, ) -> Vec<(i32, f64)>
Sample this automation across one audio block, returning (sample_offset, value)
points suitable for sample-accurate scheduling (e.g. Plugin::set_parameter_at).
block_start_secs is the block’s start on the automation timeline; frames is the
block length; points_per_block is the sub-block resolution (1 = one value at the
block start; higher = finer ramps, capped at frames). Returns empty if the
automation has no points.
Trait Implementations§
Source§impl Clone for ParameterAutomation
impl Clone for ParameterAutomation
Source§fn clone(&self) -> ParameterAutomation
fn clone(&self) -> ParameterAutomation
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 ParameterAutomation
impl Debug for ParameterAutomation
Auto Trait Implementations§
impl Freeze for ParameterAutomation
impl RefUnwindSafe for ParameterAutomation
impl Send for ParameterAutomation
impl Sync for ParameterAutomation
impl Unpin for ParameterAutomation
impl UnsafeUnpin for ParameterAutomation
impl UnwindSafe for ParameterAutomation
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