--- title: BiquadFilterNode slug: Web/API/BiquadFilterNode translation_of: Web/API/BiquadFilterNode ---
{{APIRef("Web Audio API")}}
BiquadFilterNode接口表示一个简单低阶滤波器(双二阶滤波器)
, 通过 {{ domxref("AudioContext.createBiquadFilter()") }} 方法创建. 它是一个能表示不同类型的过滤器,声调控制设备,图形均衡器的{{domxref("AudioNode")}} . 一个BiquadFilterNode(
双二阶滤波器)
总是恰好有一个输入和一个输出.
Number of inputs | 1 |
---|---|
Number of outputs | 1 |
Channel count mode | "max" |
Channel count | 2 (not used in the default count mode) |
Channel interpretation | "speakers" |
继承属性自父级的 {{domxref("AudioNode")}}.
type |
Description | frequency |
Q |
gain |
---|---|---|---|---|
lowpass |
Standard second-order resonant lowpass filter with 12dB/octave rolloff. Frequencies below the cutoff pass through; frequencies above it are attenuated. | The cutoff frequency. | Indicates how peaked the frequency is around the cutoff. The greater the value is, the greater is the peak. | Not used |
highpass |
Standard second-order resonant highpass filter with 12dB/octave rolloff. Frequencies below the cutoff are attenuated; frequencies above it pass through. | The cutoff frequency. | Indicates how peaked the frequency is around the cutoff. The greater the value, the greater the peak. | Not used |
bandpass |
Standard second-order bandpass filter. Frequencies outside the given range of frequencies are attenuated; the frequencies inside it pass through. | The center of the range of frequencies. | Controls the width of the frequency band. The greater the Q value, the smaller the frequency band. |
Not used |
lowshelf |
Standard second-order lowshelf filer. Frequencies lower than the frequency get a boost, or an attenuation; frequencies over it are unchanged. | The upper limit of the frequencies getting a boost or an attenuation. | Not used | The boost, in dB, to be applied; if negative, it will be an attenuation. |
highshelf |
Standard second-order highshelf filer. Frequencies higher than the frequency get a boost or an attenuation; frequencies lower than it are unchanged. | The lower limit of the frequencies getting a boost or an attenuation. | Not used | The boost, in dB, to be applied; if negative, it will be an attenuation. |
peaking |
Frequencies inside the range get a boost or an attenuation; frequencies outside it are unchanged. | The middle of the frequency range getting a boost or an attenuation. | Controls the width of the frequency band. The greater the Q value, the smaller the frequency band. |
The boost, in dB, to be applied; if negative, it will be an attenuation. |
notch |
Standard notch filter, also called a band-stop or band-rejection filter. It is the opposite of a bandpass filter: frequencies outside the give range of frequencies pass through; frequencies inside it are attenuated. | The center of the range of frequencies. | Controls the width of the frequency band. The greater the Q value, the smaller the frequency band. |
Not used |
allpass |
Standard second-order allpass filter. It lets all frequencies through, but changes the phase-relationship between the various frequencies. | The frequency with the maximal group delay, that is, the frequency where the center of the phase transition occurs. | Controls how sharp the transition is at the medium frequency. The larger this parameter is, the sharper and larger the transition will be. | Not used |
继承方法自父级的 {{domxref("AudioNode")}}.
{{page("/en-US/docs/Web/API/AudioContext.createBiquadFilter","Example")}}
Specification | Status | Comment |
---|---|---|
{{SpecName('Web Audio API', '#the-biquadfilternode-interface', 'BiquadFilterNode')}} | {{Spec2('Web Audio API')}} |