Skip to content

Class · inherits Instance

AudioFilter

Official docs ↗

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 FilterType is Peak, LowShelf, or HighShelf. 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 FilterType is Peak, Lowpass[x]dB, Highpass[x]dB, Bandpass, or Notch. Ranges from 0.1 to 10.

    For FilterType values of Lowpass12dB and Highpass12dB, a Q value of sqrt(2) / 2, or 0.707, corresponds to a flat filter at a 12dB/octave slope.

Methods 4

  • GetConnectedWires(pin: string) → List<Wire>Returns an array of Wires that are connected to the specified pin.

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

    Gets the list of pins that Wire can use in Wire.TargetName to connect to this instance via its Wire.TargetInstance property.

    For AudioFilter, this is Input only.

  • GetOutputPins() → ArrayGets the list of pins that Wire can use in Wire.SourceName to connect to this instance via its Wire.SourceInstance property.

    Gets the list of pins that Wire can use in Wire.SourceName to connect to this instance via its Wire.SourceInstance property.

    For AudioFilter, this is Output only.

Events 1

  • WiringChangedAudioFilter.WiringChanged:Connect(function(connected, pin, wire, instance))Fires when another instance is connected to or disconnected from the AudioFilter via a Wire.

    Event that fires after a Wire becomes connected or disconnected, and that Wire is now or was previously connected to a pin on the AudioFilter and 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.