Struct rsynth::envelope::Envelope [−][src]
General use envelope with any number of points.
Fields
points: Vec<Point>
Methods
impl Envelope
[src]
impl Envelope
pub fn interpolate(&self, x: f64) -> f64
[src]
pub fn interpolate(&self, x: f64) -> f64
Finds the amplitude at a certain value on the x
axis. Note that the envelope ends at x = 1
and not the last x
value specified.
pub fn interpolate_at_time(&self, time: f64, total_length: f64) -> f64
[src]
pub fn interpolate_at_time(&self, time: f64, total_length: f64) -> f64
Finds the amplitude at a certain time.
time
- the time, in milliseconds, that the envelope should calculate fromtotal_length
- the total length, in milliseconds, that the envelope lasts. Note that the envelope ends at the lastx
value specified. This is to make time scaling / adding additional values after the last point easier.
Trait Implementations
impl Clone for Envelope
[src]
impl Clone for Envelope
fn clone(&self) -> Envelope
[src]
fn clone(&self) -> Envelope
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Default for Envelope
[src]
impl Default for Envelope