Struct oxcable_basic_devices::adsr::Adsr
[−]
[src]
pub struct Adsr { // some fields omitted }
A multichannel ADSR filter.
Methods
impl Adsr
fn new(attack_time: f32, decay_time: f32, sustain_level: f32, release_time: f32, num_channels: usize) -> Self
Returns a new ADSR filter with the provided envelope settings.
attack_time
specifies the length of the attack in seconds.decay_time
specifies the length of the decay in seconds.sustain_level
specifies the amplitude of the sustain from 0 to 1.release_time
specifies the length of the release in seconds.num_channels
defines how many channels of audio to filter.
fn default(num_channels: usize) -> Self
Returns an ADSR with reasonable default values for the envelope.