Class
AudioGate
Mutes audio streams that fall below a certain volume threshold.
AudioGate behaves like a noise gate, muting audio streams when their
volume drops below a specified Threshold. It is
useful for removing background noise from microphone input or cleaning up
audio tracks. It provides one Input pin and one Output pin which can
be connected to/from by Wires.
Properties 4#
Attackfloat | Controls how long it takes for the gate to open when the signal level
rises above the Threshold.ReadSafe |
Bypassboolean | Whether audio streams are passed-through unaffected by this effect.ReadSafe |
Releasefloat | Controls how long it takes for the gate to close when the signal level
drops below the Threshold.ReadSafe |
ThresholdNumberRange | The gain value(s) around which the gate opens and closes.ReadSafe |
Attack: float#
ReadSafe
The duration, in seconds, over which the gate will unmute the audio stream
when the signal level rises above the
Threshold. Ranges from 0.001 to 5.
Bypass: boolean#
ReadSafe
If true, audio streams are passed-through unaffected by this effect.
Release: float#
ReadSafe
The duration, in seconds, over which the gate will mute the audio stream
when the signal level drops below the
Threshold. Ranges from 0.001 to 5.
Threshold: NumberRange#
ReadSafe
The gain value(s), in decibels, at which the gate will transition from being closed (i.e. muted) to being open (i.e. unmuted).
AudioGate.Threshold is a NumberRange with a "low" and a
"high" threshold. The gate starts out muted - when the input stream's
volume rises above the "high" threshold, the gate will unmute the audio
stream over the course of Attack seconds. If the
input stream's volume then dips below the "low" threshold, the gate will
mute the audio stream over the course of Release
seconds. The two "low" and "high" thresholds create a hysteresis region to
prevent the gate from opening and closing very rapidly.
Ranges from -80 to 30, and defaults to -36 (low) and -24 (high).
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. AudioGate has one "Input" 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 AudioGate, this is Input only.
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 AudioGate, 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
AudioGate via a 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