Struct compressor::Compressor [] [src]

pub struct Compressor<F, D, EGF> {
    pub threshold: f32,
    // some fields omitted
}

A dynamics processing unit designed to compress some given audio signal that exceeds the threshold using the ratio.

The Compressor is generic over its envelope Detector and the EvenGainFunction (used to determine the gain that will be applied evenly to all channels for a single frame).

Fields

When the detected envelope exceeds this threshold, the signal is compressed via the ratio.

Methods

impl<F, D, EGF> Compressor<F, D, EGF> where
    F: Frame,
    D: Detector<F>,
    EGF: EvenGainFunction
[src]

Compresses the given output using an even gain across all channels.

impl<F, D, EGF> Compressor<F, D, EGF> where
    F: Frame,
    D: Detector<F>,
    EGF: EvenGainFunction
[src]

Set the duration of the envelope's attack in milliseconds.

Set the duration of the envelope's release in milliseconds.

Updates the Compressor's attack gain in accordance with the current sample_hz.

Updates the Compressor's release gain in accordance with the current sample_hz.

Steps forward the detectors using the given frame and determines the gain per-channel, yielding the result as a Frame.

Produce the gain to be applied evenly across all channels for the next frame.

Steps forward the Compressor by the given frame and returns the compressed result.

Trait Implementations

impl<F: Clone, D: Clone, EGF: Clone> Clone for Compressor<F, D, EGF>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<F: Debug, D: Debug, EGF: Debug> Debug for Compressor<F, D, EGF>
[src]

Formats the value using the given formatter.