Adds a Compressor audio effect to an Audio bus. Reduces sounds that exceed a certain threshold level, smooths out the dynamics and increases the overall volume.
    public class AudioEffectCompressor : AudioEffect

Dynamic range compressor reduces the level of the sound when the amplitude goes over a certain threshold in Decibels. One of the main uses of a compressor is to increase the dynamic range by clipping as little as possible (when sound goes over 0dB).

Compressor has many uses in the mix:

  • In the Master bus to compress the whole output (Although a AudioEffectLimiter is probably better)

  • In voice channels to ensure they sound as balanced as possible.

  • Sidechained. Sidechained, which can reduce the sound level sidechained with another audio bus for threshold detection.. This technique is very common in video game mixing to download the level of Music/SFX while voices are being heard.

  • Accentuates transients by using a wider attack, making effects sound more punchy.

Inheritance Chain

Constructors

    public AudioEffectCompressor()

Properties

    public float AttackUs { get; set; }

Compressor’s reaction time when the signal exceeds the threshold. Value can range from 20 to 2000. Default value: 20ms.

    public float Gain { get; set; }

Gain applied to the output signal.

    public float Mix { get; set; }

Balance between original signal and effect signal. Value can range from 0 (totally dry) to 1 (totally wet). Default value: 1.

    public float Ratio { get; set; }

Amount of compression applied to the audio once it passes the threshold level. The higher the ratio the more the loud parts of the audio will be compressed. Value can range from 1 to 48. Default value: 4.

    public float ReleaseMs { get; set; }

Compressor’s delay time to stop reducing the signal after the signal level falls below the threshold. Value can range from 20 to 2000. Default value: 250ms.

    public string Sidechain { get; set; }

Reduce the sound level using another audio bus for threshold detection.

    public float Threshold { get; set; }

The level above which compression is applied to the audio. Value can range from -60 to 0. Default value: 0.

Methods

    public float GetAttackUs()

Getter for AttackUs

    public float GetGain()

Getter for Gain

    public float GetMix()

Getter for Mix

    public float GetRatio()

Getter for Ratio

    public float GetReleaseMs()

Getter for ReleaseMs

    public string GetSidechain()

Getter for Sidechain

    public float GetThreshold()

Getter for Threshold

    public void SetAttackUs(float attackUs)

Setter for AttackUs

    public void SetGain(float gain)

Setter for Gain

    public void SetMix(float mix)

Setter for Mix

    public void SetRatio(float ratio)

Setter for Ratio

    public void SetReleaseMs(float releaseMs)

Setter for ReleaseMs

    public void SetSidechain(string sidechain)

Setter for Sidechain

    public void SetThreshold(float threshold)

Setter for Threshold

Tags: