Struct Noise Gate Config
pub struct NoiseGateConfig { /* private fields */ }Expand description
Prepared downward-expansion gate configuration with a finite attenuation floor. The ratio multiplies input dB below threshold; one leaves the signal unchanged.
Implementations§
§impl NoiseGateConfig
impl NoiseGateConfig
pub fn new(
rate: f64,
threshold_db: f64,
ratio: f64,
knee_db: f64,
attack: f64,
release: f64,
floor_db: f64,
) -> Result<Self, DynamicsError>
pub fn new( rate: f64, threshold_db: f64, ratio: f64, knee_db: f64, attack: f64, release: f64, floor_db: f64, ) -> Result<Self, DynamicsError>
Threshold -120..24 dB, expansion ratio 1..100, knee 0..48 dB, attenuation floor -120..0 dB and detector times 0..60 seconds. A zero detector time is instantaneous; the floor does not hard-mute audio.
pub fn gain_for_level(&self, level: f64) -> Result<f64, DynamicsError>
pub fn gain_for_level(&self, level: f64) -> Result<f64, DynamicsError>
Static linear gain for a finite nonnegative detector level. Silence reaches the attenuation floor, except ratio one remains unity.
Trait Implementations§
§impl Clone for NoiseGateConfig
impl Clone for NoiseGateConfig
§fn clone(&self) -> NoiseGateConfig
fn clone(&self) -> NoiseGateConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for NoiseGateConfig
Auto Trait Implementations§
impl Freeze for NoiseGateConfig
impl RefUnwindSafe for NoiseGateConfig
impl Send for NoiseGateConfig
impl Sync for NoiseGateConfig
impl Unpin for NoiseGateConfig
impl UnsafeUnpin for NoiseGateConfig
impl UnwindSafe for NoiseGateConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for T
impl<T> BorrowMut<T> for T
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more