pub struct AdsrModulator {
pub attack: Time,
pub decay: Time,
pub sustain: Time,
pub sustain_level: f32,
pub release: Time,
}Expand description
ADSR envelope.
It looks like this: 🭋🭍🬹🬿
- Until
attack, the value goes from 0 to 1; - Until
decay, it goes from 1 tosustain_level; - Until
sustain, it holdssustain_level; - Until
release, it goes fromsustain_levelto 0; - After
release, it holds 0.
Most commonly used with Gain.
Fields§
§attack: TimeWhen the value reaches 1.
decay: TimeWhen the value reaches sustain_level.
sustain: TimeUntil when the value holds sustain_level.
sustain_level: f32The value generated from decay until sustain.
release: TimeWhen the value drops to 0.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AdsrModulator
impl RefUnwindSafe for AdsrModulator
impl Send for AdsrModulator
impl Sync for AdsrModulator
impl Unpin for AdsrModulator
impl UnsafeUnpin for AdsrModulator
impl UnwindSafe for AdsrModulator
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