Class
AudioCompressor
Adjusts the dynamic range of input streams.
AudioCompressor adjusts the dynamic range of audio streams. Any
momentary bursts of loudness will be clamped down according to the
compressor's properties.
AudioCompressor provides Input and Sidechain pins that can be
targeted by Wire.TargetName, and an Output pin that can be used by
Wire.SourceName.
Properties 6#
Attackfloat | Controls how quickly the compressor will clamp down on volume after it
surpasses Threshold.ReadSafe |
Bypassboolean | Whether audio streams are passed-through unaffected by this effect.ReadSafe |
MakeupGainfloat | A gain value to be applied after compression.ReadSafe |
Ratiofloat | Ratio of input volume to output volume, to be applied when surpassing
Threshold.ReadSafe |
Releasefloat | Controls how quickly the compressor will unclamp after the stream volume
dips back below Threshold.ReadSafe |
Thresholdfloat | Gain value at which the compressor will start to modify the input stream.ReadSafe |
Attack: float#
ReadSafe
Time, in seconds, denoting how quickly the compressor will clamp down on
volume after it surpasses Threshold.
Ranges from 0.0001 to 0.5.
Bypass: boolean#
ReadSafe
If true, audio streams are passed-through unaffected by this effect.
MakeupGain: float#
ReadSafe
Gain value to be applied after compression, in decibels. After limiting the dynamic range, the resulting stream may be very quiet and this property can be used to compensate. Ranges from -30 to 30.
Ratio: float#
ReadSafe
Ratio of input volume to output volume, to be applied when surpassing
Threshold. For example, a value of 2
will cut the amount by which the input stream exceeds the threshold in
half whenever the input stream does so. Ranges from 1 to 50.
Release: float#
ReadSafe
Time, in seconds, denoting how quickly the compressor will unclamp after
its stream volume dips back below
Threshold. Ranges from 0.01 to 5.
Threshold: float#
ReadSafe
Gain value at which the compressor will start to modify the input stream,
in decibels, with a range of -60 to 0. When the input stream's volume
surpasses Threshold, the compressor will
take Attack seconds to kick in. When the
input stream's volume recedes below
Threshold, the compressor will take
Release seconds to stop acting.
If any Wires are connected to the Sidechain pin of the
compressor, this threshold analyzes those streams instead of the Input
streams; this can be used to duck the volume of one stream in response to
another.
Methods 3#
| GetConnectedWires | Returns an array of Wires that are connected to the specified
pin. |
| GetInputPins | Gets the list of pins that Wire can use in Wire.TargetName
to connect to this instance via its Wire.TargetInstance property. |
| GetOutputPins | Gets the list of pins that Wire can use in Wire.SourceName
to connect to this instance via its Wire.SourceInstance property. |
GetConnectedWires(pin: string): List<Wire>#
Returns an array of Wires that are connected to the specified
pin. AudioCompressor has one "Input" pin, one "Sidechain" pin, and
one "Output" pin.
| Name | Type | Default | Description |
|---|---|---|---|
pin | string | An input or output pin on this instance |
Returns
List<Wire>— An array ofWires
GetInputPins(): Array#
Gets the list of pins that Wire can use in Wire.TargetName
to connect to this instance via its Wire.TargetInstance property.
For AudioCompressor, these are:
InputSidechain
Returns
Array— An array of strings representing valid pin names.
GetOutputPins(): Array#
Gets the list of pins that Wire can use in Wire.SourceName
to connect to this instance via its Wire.SourceInstance property.
For AudioCompressor, this is Output only.
Returns
Array— An array of strings representing valid pin names.
Events 1#
| WiringChanged | Fires when another instance is connected to or disconnected from the
AudioCompressor via a Wire. |
WiringChanged(connected: boolean, pin: string, wire: Wire, instance: Instance)#
Event that fires after a Wire becomes connected or disconnected,
and that Wire is now or was previously connected to a pin on the
AudioCompressor and to some other wirable instance.
| Name | Type | Default | Description |
|---|---|---|---|
connected | boolean | Whether the instance got connected or disconnected. | |
pin | string | The pin on the AudioCompressor that the Wire targets. | |
wire | Wire | The Wire between the AudioCompressor and the other
instance. | |
instance | Instance | The other instance that is or was connected through the Wire. |
Inherited members#
Inherited from Instance 58
Properties (10)
Archivable, archivable, Capabilities, IsInSandbox, Name, Parent, PredictionMode, RobloxLocked, Sandboxed, UniqueId
Methods (39)
AddTag, children, ClearAllChildren, Clone, clone, Destroy, destroy, FindFirstAncestor, FindFirstAncestorOfClass, FindFirstAncestorWhichIsA, FindFirstChild, findFirstChild, FindFirstChildOfClass, FindFirstChildWhichIsA, FindFirstDescendant, GetActor, GetAttribute, GetAttributeChangedSignal, GetAttributes, GetChildren, getChildren, GetDebugId, GetDescendants, GetFullName, GetStyled, GetStyledPropertyChangedSignal, GetTags, HasTag, IsAncestorOf, IsDescendantOf, isDescendantOf, IsPropertyModified, QueryDescendants, Remove, remove, RemoveTag, ResetPropertyToDefault, SetAttribute, WaitForChild