pub struct Duck {
pub threshold_db: f64,
pub depth_db: f64,
pub ratio: f64,
pub attack: Duration,
pub release: Duration,
pub lookahead: Duration,
}Expand description
Sidechain ducking parameters. The trigger’s peak-hold envelope is converted to a gain reduction in dB, smoothed by attack/release and applied to the ducked signal.
Fields§
§threshold_db: f64Trigger level above which ducking starts, in -96..=0 dBFS.
depth_db: f64Maximum gain reduction, in 0..=96 dB.
ratio: f64Compression ratio above the threshold, in 1..=100; reduction is capped by depth_db.
attack: DurationTime to reach a deeper reduction, in 0..=5 seconds.
release: DurationTime to recover after the trigger falls, in 0..=10 seconds.
lookahead: DurationInterval by which ducking anticipates the trigger, in 0..=500 milliseconds.
Implementations§
Source§impl Duck
impl Duck
Sourcepub fn new(threshold_db: f64, depth_db: f64) -> Self
pub fn new(threshold_db: f64, depth_db: f64) -> Self
Creates ducking with the given threshold and depth and default timing.
Sourcepub fn timing(self, attack: Duration, release: Duration) -> Self
pub fn timing(self, attack: Duration, release: Duration) -> Self
Sets attack and release times.
Sourcepub fn validate(self) -> Result<(), ValidationError>
pub fn validate(self) -> Result<(), ValidationError>
Checks finite bounded parameters.
Trait Implementations§
impl Copy for Duck
impl StructuralPartialEq for Duck
Auto Trait Implementations§
impl Forget for Duck
impl Freeze for Duck
impl RefUnwindSafe for Duck
impl Send for Duck
impl Sync for Duck
impl Unpin for Duck
impl UnsafeUnpin for Duck
impl UnwindSafe for Duck
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