Reference API Roblox

Engine API

Website

Related

Reference API Roblox

CompressorSoundEffect

Adjusts the dynamic range of audio.

Member index 6

HistoryMember
553Attack: float
553GainMakeup: float
553Ratio: float
553Release: float
553SideChain: Instance
553Threshold: float
inherited from SoundEffect
553Enabled: bool
553Priority: int
inherited from Instance
553Archivable: bool
635Capabilities: SecurityCapabilities
553Name: string
553Parent: Instance
635Sandboxed: bool
616UniqueId: UniqueId
576AddTag(tag: string): null
573ClearAllChildren(): null
462Clone(): Instance
573Destroy(): null
486FindFirstAncestor(name: string): Instance
486FindFirstAncestorOfClass(className: string): Instance
486FindFirstAncestorWhichIsA(className: string): Instance
486FindFirstChild(name: string, recursive: bool = false): Instance
486FindFirstChildOfClass(className: string): Instance
486FindFirstChildWhichIsA(className: string, recursive: bool = false): Instance
486FindFirstDescendant(name: string): Instance
563GetActor(): Actor
486GetAttribute(attribute: string): Variant
462GetAttributeChangedSignal(attribute: string): RBXScriptSignal
631GetAttributes(): Dictionary
648GetChildren(): Instances
462GetDebugId(scopeLength: int = 4): string
486GetDescendants(): Array
486GetFullName(): string
641GetStyled(name: string): Variant
576GetTags(): Array
576HasTag(tag: string): bool
486IsAncestorOf(descendant: Instance): bool
486IsDescendantOf(ancestor: Instance): bool
580IsPropertyModified(name: string): bool
573Remove(): null
576RemoveTag(tag: string): null
580ResetPropertyToDefault(name: string): null
573SetAttribute(attribute: string, value: Variant): null
462WaitForChild(childName: string, timeOut: double): Instance
648children(): Instances
553clone(): Instance
573destroy(): null
553findFirstChild(name: string, recursive: bool = false): Instance
648getChildren(): Instances
553isDescendantOf(ancestor: Instance): bool
573remove(): null
462AncestryChanged(child: Instance, parent: Instance)
462AttributeChanged(attribute: string)
462ChildAdded(child: Instance)
462ChildRemoved(child: Instance)
462DescendantAdded(descendant: Instance)
462DescendantRemoving(descendant: Instance)
500Destroying()
553childAdded(child: Instance)
inherited from Object
647ClassName: string
647className: string
647GetPropertyChangedSignal(property: string): RBXScriptSignal
647IsA(className: string): bool
650isA(className: string): bool
647Changed(property: string)

Description

A compressor 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 CompressorSoundEffect.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 CompressorSoundEffect.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 CompressorSoundEffect.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 CompressorSoundEffect.GainMakeup determines how much the effect amplifies the sound.

History 26

Members 6

Attack

TypeDefault
float0.100000001

Range: 0.1 to 1 (default 0.1) The time the effect takes to become active after its Threshold has be reached. Measured in seconds.

History 4

GainMakeup

TypeDefault
float0

Range: 0 to 30 (default 0) 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 be reached or not. Measured in dB.

History 4

Ratio

TypeDefault
float40

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

History 4

Release

TypeDefault
float0.100000001

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

History 4

SideChain

TypeDefault
Instance

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

History 5

Threshold

TypeDefault
float-40

Range: -80 to 0 (default 0) 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. Measured in dB.

History 4

Settings