AudioFilter
Adjusts the frequency content of audio streams.
Memory category | Internal |
---|
Member index 9
Description
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.
History 13
- 652 Add WiringChanged
- 648 Change ReturnType of GetConnectedWires from Objects to Instances
- 643 Change Tags of AudioFilter from [NotBrowsable] to []
- 637 Change ReturnType of GetConnectedWires from Array to Objects
- 635 Add Editor
- 633 Add GetGainAt
- 633 Add GetConnectedWires
- 633 Add Q
- 633 Add Gain
- 633 Add Frequency
- 633 Add FilterType
- 633 Add Bypass
- 633 Add AudioFilter
Members 9
Bypass
Type | Default | |
---|---|---|
bool | false |
If true
, audio streams are passed-through unaffected by this effect.
Thread safety | ReadSafe |
---|---|
Category | State |
Loaded/Saved | true |
Editor
Type | Default | |
---|---|---|
bool | false |
Security | RobloxScriptSecurity |
---|---|
Thread safety | ReadSafe |
Category | State Editing |
Loaded/Saved | true/false |
FilterType
Type | Default | |
---|---|---|
AudioFilterType | Peak |
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.
Thread safety | ReadSafe |
---|---|
Category | State |
Loaded/Saved | true |
History 1
- 633 Add FilterType
Frequency
Type | Default | |
---|---|---|
float | 2000 |
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.
Thread safety | ReadSafe |
---|---|
Category | State |
Loaded/Saved | true |
Gain
Type | Default | |
---|---|---|
float | 0 |
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.
Thread safety | ReadSafe |
---|---|
Category | State |
Loaded/Saved | true |
GetConnectedWires
Parameters (1) | ||
---|---|---|
pin | string | |
Returns (1) | ||
Instances |
Returns an array of Wires that are connected to the specified pin. AudioFilter has one "Input" pin and one "Output" pin.
Thread safety | Unsafe |
---|
History 3
- 648 Change ReturnType of GetConnectedWires from Objects to Instances
- 637 Change ReturnType of GetConnectedWires from Array to Objects
- 633 Add GetConnectedWires
GetGainAt
Parameters (1) | ||
---|---|---|
frequency | float | |
Returns (1) | ||
float |
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.
Thread safety | Unsafe |
---|
Q
Type | Default | |
---|---|---|
float | 0.707000017 |
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.
Thread safety | ReadSafe |
---|---|
Category | State |
Loaded/Saved | true |
WiringChanged
Parameters (4) | |
---|---|
connected | bool |
pin | string |
wire | Wire |
instance | Instance |
Thread safety | Unsafe |
---|
History 1
- 652 Add WiringChanged