reckfellENGINE

AudioEffectCompressor

Adds a downward compressor audio effect to an audio bus. Allows control of the dynamic range via a volume threshold and timing controls.

On this page
class AudioEffectCompressorReckfellSharpInherits AudioEffect

Adds a downward compressor audio effect to an audio bus. Allows control of the dynamic range via a volume threshold and timing controls.

A "compressor" decreases the volume of sounds when it exceeds a certain volume threshold level. A compressor can have many uses in a mix:

  • To compress the whole volume in the Master bus (although an AudioEffectHardLimiter is probably better).
  • To ensure balance of voice audio clips.
  • To sidechain, using another bus as a trigger. This decreases the volume of the bus it is attached to, by using the volume from another audio bus for threshold detection. This technique is common in video game mixing to decrease the volume of music and SFX while voices are being heard. This effect is also known as "ducking".
  • To accentuate transients by using a long attack, letting sounds exceed the volume threshold level for a short period before compressing them. This can be used to make SFX more punchy.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

AudioEffectCompressorConstructor
# AudioEffectCompressor
C#
public AudioEffectCompressor();

Properties7

AttackUsProperty
# AttackUs
C#
public float AttackUs { get; set; }

Compressor's reaction time when the audio exceeds the volume threshold level, in microseconds. Value can range from 20 to 2000.

GainProperty
# Gain
C#
public float Gain { get; set; }

Gain of the audio signal, in dB. Value can range from -20 to 20.

MixProperty
# Mix
C#
public float Mix { get; set; }

Balance between the original audio and the compressed audio. Value can range from 0 (totally dry) to 1 (totally wet).

RatioProperty
# Ratio
C#
public float Ratio { get; set; }

Amount of compression applied to the audio once it passes the volume threshold level. The higher the ratio, the stronger the compression applied to audio signals that pass the volume threshold level. Value can range from 1 to 48.

ReleaseMsProperty
# ReleaseMs
C#
public float ReleaseMs { get; set; }

Compressor's delay time to stop decreasing the volume after the it falls below the volume threshold level, in milliseconds. Value can range from 20 to 2000.

SidechainProperty
# Sidechain
C#
public StringName Sidechain { get; set; }

Audio bus to use for the volume threshold detection.

ThresholdProperty
# Threshold
C#
public float Threshold { get; set; }

The volume level above which compression is applied to the audio, in dB. Value can range from -60 to 0.

Methods14

GetAttackUsfloat
# GetAttackUs
C#
public float GetAttackUs();
Returns float
GetGainfloat
# GetGain
C#
public float GetGain();
Returns float
GetMixfloat
# GetMix
C#
public float GetMix();
Returns float
GetRatiofloat
# GetRatio
C#
public float GetRatio();
Returns float
GetReleaseMsfloat
# GetReleaseMs
C#
public float GetReleaseMs();
Returns float
GetSidechainStringName
# GetSidechain
C#
public StringName GetSidechain();
Returns StringName
GetThresholdfloat
# GetThreshold
C#
public float GetThreshold();
Returns float
SetAttackUsvoid
# SetAttackUs
C#
public void SetAttackUs(float attackUs);
Parameters
NameTypeDefault
attackUsfloat—
SetGainvoid
# SetGain
C#
public void SetGain(float gain);
Parameters
NameTypeDefault
gainfloat—
SetMixvoid
# SetMix
C#
public void SetMix(float mix);
Parameters
NameTypeDefault
mixfloat—
SetRatiovoid
# SetRatio
C#
public void SetRatio(float ratio);
Parameters
NameTypeDefault
ratiofloat—
SetReleaseMsvoid
# SetReleaseMs
C#
public void SetReleaseMs(float releaseMs);
Parameters
NameTypeDefault
releaseMsfloat—
SetSidechainvoid
# SetSidechain
C#
public void SetSidechain(StringName sidechain);
Parameters
NameTypeDefault
sidechainStringName—
SetThresholdvoid
# SetThreshold
C#
public void SetThreshold(float threshold);
Parameters
NameTypeDefault
thresholdfloat—
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.