Roblox UtilitiesDevlHub Roblox Documentation

Class

AudioGate

Inherits
Instance › Object
Memory category
Internal

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#

AttackfloatControls how long it takes for the gate to open when the signal level rises above the Threshold.ReadSafe
BypassbooleanWhether audio streams are passed-through unaffected by this effect.ReadSafe
ReleasefloatControls how long it takes for the gate to close when the signal level drops below the Threshold.ReadSafe
ThresholdNumberRangeThe 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#

GetConnectedWiresReturns an array of Wires that are connected to the specified pin.
GetInputPinsGets the list of pins that Wire can use in Wire.TargetName to connect to this instance via its Wire.TargetInstance property.
GetOutputPinsGets 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.

NameTypeDefaultDescription
pinstringAn input or output pin on this instance
Returns
  • List<Wire> — An array of Wires

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#

WiringChangedFires when another instance is connected to or disconnected from the AudioGate 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 AudioGate and to some other wirable instance.

NameTypeDefaultDescription
connectedbooleanWhether the instance got connected or disconnected.
pinstringThe pin on the AudioGate that the Wire targets.
wireWireThe Wire between the AudioGate and the other instance.
instanceInstanceThe other instance that is or was connected through the Wire.

Inherited members#

Inherited from Instance 58
Inherited from Object 6
Properties (2)

ClassName, className

Events (1)

Changed