Class · inherits Instance
AudioFilter
Adjusts the frequency content of audio streams.
About AudioFilter
AudioFilter adjusts the frequency content of audio streams. It
provides one Input pin and one Output pin which can be connected
to/from by Wires. AudioFilter uses its
FilterType, Gain, and
Q properties to determine what to do around a particular
cutoff Frequency.
Properties 5
Bypass
: booleanWhether audio streams are passed-through unaffected by this effect.If
true, audio streams are passed-through unaffected by this effect.FilterType
: AudioFilterTypeThe curve type of the band represented by the filter.The type of frequency response curve that will be used to filter the audio signal. Each type of curve affects the frequency content of the audio in different ways.
Frequency
: floatThe central frequency that the filter acts around.The central frequency in hertz of the curve represented by the filter. Generally, adjusting this value up or down corresponds to a horizontal shift in the overall frequency curve. Ranges from 20 to 22000.
Gain
: floatFor peaking and shelving filters, controls volume increase or reduction.The gain value in decibels used to determine the volume level of the curve represented by the filter. Only applies when the
FilterTypeisPeak,LowShelf, orHighShelf. Ranges from -30 to 30.Q
: floatFor peaking, lowpass, highpass, bandpass, and notch filters, controls the selectiveness or resonance.The quality value used to determine the slope or resonance of the curve represented by the filter. Only applies when the
FilterTypeisPeak,Lowpass[x]dB,Highpass[x]dB,Bandpass, orNotch. Ranges from 0.1 to 10.For
FilterTypevalues ofLowpass12dBandHighpass12dB, a Q value ofsqrt(2) / 2, or0.707, corresponds to a flat filter at a 12dB/octave slope.
Methods 4
GetConnectedWires
(pin: string) → List<Wire>Returns an array ofWiresthat are connected to the specified pin.Returns an array of
Wiresthat are connected to the specified pin.AudioFilterhas one "Input" pin and one "Output" pin.GetGainAt
(frequency: float) → floatReturns the magnitude response of the filter at the given frequency.Returns the gain value, in decibels, of the frequency response curve represented by the filter at the given frequency, in hertz. This can be used to sample the exact shape of the filter in key places or as a whole.
GetInputPins
() → ArrayGets the list of pins thatWirecan use inWire.TargetNameto connect to this instance via itsWire.TargetInstanceproperty.Gets the list of pins that
Wirecan use inWire.TargetNameto connect to this instance via itsWire.TargetInstanceproperty.For
AudioFilter, this isInputonly.GetOutputPins
() → ArrayGets the list of pins thatWirecan use inWire.SourceNameto connect to this instance via itsWire.SourceInstanceproperty.Gets the list of pins that
Wirecan use inWire.SourceNameto connect to this instance via itsWire.SourceInstanceproperty.For
AudioFilter, this isOutputonly.
Events 1
WiringChanged
AudioFilter.WiringChanged:Connect(function(connected, pin, wire, instance))Fires when another instance is connected to or disconnected from theAudioFiltervia aWire.Event that fires after a
Wirebecomes connected or disconnected, and thatWireis now or was previously connected to a pin on theAudioFilterand to some other wirable instance.
AudioFilter also has every member of Instance. Deprecated and Roblox-only members are hidden.
Reference text from the Roblox Creator Documentation, licensed CC BY 4.0, reorganized by rbxtoolshub.com · Studio 0.743.0.7431133.