Skip to content

CompressorSoundEffect

Supported Class Audio

Adjusts the dynamic range of audio.

Description

A CompressorSoundEffect is used to reduce the dynamic range of audio by moving the highs and lows of a signal closer together. It does this by lowering the volume of the highest parts of a source while at the same time raising the overall volume. This type of effect is useful when you have many sounds playing and you want to make sure the quieter ones are still audible. This effect can be applied to either an individual Sound or SoundGroup by parenting it to the desired instance.

A compressor has several properties which determine how it works. The Threshold is the audio level where the compressor will start to lower the volume. As soon as the source goes below the threshold, the compressor will stop lowering the volume.

The Attack determines how long it takes for the compressed effect to fully apply. After the threshold has been crossed the compressor will lower the volume over time until the desired ratio has been reached. It will take the time specified by Attack to reach this ratio.

The Release determines how long it takes for the compressor to remove its effect. After the volume of the source is under the threshold, the compressor will restore the volume back to the original over the time specified by Release.

Along with lowering the volume when the sound has passed the threshold, a compressor will also amplify the entire sound (after any threshold lowering has taken effect). This allows quieter sounds to be amplified while louder sounds can stay about the same. The GainMakeup determines how much the effect amplifies the sound.

Inheritance

Object → Instance → SoundEffect → CompressorSoundEffect

Nova inheritance: Instance → SoundEffect → CompressorSoundEffect

Properties

Attack Supported Property The time the effect takes to become active after its Threshold has been reached.
Attack: float

The time the effect takes to become active after its Threshold has been reached. Range is 0.1 to 1 (default 0.1), measured in seconds.

Roblox documentation

GainMakeup Supported Property The overall amplification applied to the effect's Sound or SoundGroup after attenuation of sounds above the threshold.
GainMakeup: float

The overall amplification applied to the effect's Sound or SoundGroup after attenuation of sounds above the threshold. Keep in mind this amplification will occur as long as the effect is active, regardless of whether the Threshold has been reached or not. Range is -30 to 30 (default 0), measured in dB.

Roblox documentation

Ratio Supported Property The ratio between the SideChain sound effect, and this sound effect.
Ratio: float

The ratio between the SideChain sound effect, and this sound effect.

Roblox documentation

Release Supported Property The time the effect takes to become inactive after its sound is below the Threshold.
Release: float

The time the effect takes to become inactive after its sound is below the Threshold. Range is 0 to 5 (default 0.1), measured in seconds.

Roblox documentation

SideChain Supported Property Applies a ducking effect to the compressor sound effect. The behavior of the sidechain depends on the Sound or SoundGroup linked to it.
SideChain: Object

Applies a ducking effect to the compressor sound effect. The behavior of the sidechain depends on the Sound or SoundGroup linked to it.

Roblox reference signature
SideChain: Instance

Roblox documentation

Threshold Supported Property Volume level at which point the compressor applies its effect.
Threshold: float

Volume level at which point the compressor applies its effect. If the effect's Sound or SoundGroup is below the effect will not attenuate the sound, although the GainMakeup will still be applied. Range is -80 to 0 (default 0), measured in dB.

Roblox documentation

Inherited members

Inherited from SoundEffect: 10 properties, 36 methods, 7 events. They are documented on the base class page.

Roblox reference: CompressorSoundEffect

Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.