AudioEffectFilter
Base class for filters. Use effects that inherit this class instead of using it directly.
Base class for filters. Use effects that inherit this class instead of using it directly.
A "filter" controls the gain of frequencies, using AudioEffectFilter.CutoffHz as a frequency threshold. Filters can help to give room for each sound, and create interesting effects.
There are different types of filter that inherit this class:
Shelf filters: AudioEffectLowShelfFilter and AudioEffectHighShelfFilter
Band-pass and notch filters: AudioEffectBandPassFilter, AudioEffectBandLimitFilter, and AudioEffectNotchFilter
Low/high-pass filters: AudioEffectLowPassFilter and AudioEffectHighPassFilter
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
AudioEffectFilterConstructor
public AudioEffectFilter();Properties4
CutoffHzProperty
public float CutoffHz { get; set; }Frequency threshold for the filter, in Hz. Value can range from 1 to 20500.
DbProperty
public AudioEffectFilter.FilterDB Db { get; set; }Steepness of the cutoff curve in dB per octave (twice the frequency above AudioEffectFilter.CutoffHz, or half the frequency below AudioEffectFilter.CutoffHz), also known as the "order" of the filter. Higher orders have a more aggressive cutoff.
GainProperty
public float Gain { get; set; }Gain of the frequencies affected by the filter. This property is only available for AudioEffectLowShelfFilter and AudioEffectHighShelfFilter. Value can range from 0 to 4.
ResonanceProperty
public float Resonance { get; set; }Gain at or directly next to the AudioEffectFilter.CutoffHz frequency threshold. Value can range from 0 to 1.
Its exact behavior depends on the selected filter type:
- For shelf filters, it accentuates or masks the order by increasing frequencies right next to the
AudioEffectFilter.CutoffHzfrequency and decreasing frequencies on the opposite side. - For the band-pass and notch filters, it widens or narrows the filter at the
AudioEffectFilter.CutoffHzfrequency threshold. - For low/high-pass filters, it increases or decreases frequencies at the
AudioEffectFilter.CutoffHzfrequency threshold.
Methods8
GetCutofffloat
public float GetCutoff();floatGetDbAudioEffectFilter.FilterDB
public AudioEffectFilter.FilterDB GetDb();AudioEffectFilter.FilterDBGetGainfloat
public float GetGain();floatGetResonancefloat
public float GetResonance();floatSetCutoffvoid
public void SetCutoff(float freq);| Name | Type | Default |
|---|---|---|
freq | float | — |
SetDbvoid
public void SetDb(AudioEffectFilter.FilterDB amount);| Name | Type | Default |
|---|---|---|
amount | AudioEffectFilter.FilterDB | — |
SetGainvoid
public void SetGain(float amount);| Name | Type | Default |
|---|---|---|
amount | float | — |
SetResonancevoid
public void SetResonance(float amount);| Name | Type | Default |
|---|---|---|
amount | float | — |
AudioEffectFilter.FilterDB
| Value | Description |
|---|---|
Filter12Db = 1 | Cutting off at 12 dB per octave. One octave is twice the frequency above |
Filter18Db = 2 | Cutting off at 18 dB per octave. One octave is twice the frequency above |
Filter24Db = 3 | Cutting off at 24 dB per octave. One octave is twice the frequency above |
Filter6Db = 0 | Cutting off at 6 dB per octave. One octave is twice the frequency above |