The IIRFilterNode
interface of the Web Audio API is a AudioNode
processor which implements a general infinite impulse response (IIR) filter; this type of filter can be used to implement tone control devices and graphic equalizers as well. It lets the parameters of the filter response be specified, so that it can be tuned as needed.
Number of inputs | 1 |
---|---|
Number of outputs | 1 |
Channel count mode | "max" |
Channel count | Same as on the input |
Channel interpretation | "speakers" |
You shouldn't call this interface's constructor directly; instead, call AudioContext.createIIRFilter()
to create an instance of this interface.
Typically, it's best to use the BiquadFilterNode
interface to implement higher-order filters. There are several reasons why:
BiquadFilterNode
.However, if you need to create an odd-ordered IIR filter, you'll need to use IIRFilterNode
. You may also find this interface useful if you don't need automation, or for other reasons.
Once the node has been created, you can't change its coefficients.
IIRFilterNode
s have a tail-time reference; they continue to output non-silent audio with zero input. As an IIR filter, the non-zero input continues forever, but this can be limited after some finite time in practice, when the output has approached zero closely enough. The actual time that takes depends on the filter coefficients provided.
IIRFilterNode()
This interface has no properties of its own; however, it inherits properties from its parent, AudioNode
.
Inherits methods from its parent, AudioNode
. It also has the following additional methods:
getFrequencyResponse()
Specification | Status | Comment |
---|---|---|
Web Audio API The definition of 'IIRFilterNode' in that specification. | Working Draft | Initial Definition |
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 49 | Yes | 50 | No | 36 | ? |
IIRFilterNode() constructor |
551 | ? | 53 | No | 42 | ? |
getFrequencyResponse |
49 | Yes | 50 | No | 36 | ? |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic support | 49 | 49 | Yes | 50 | No | 36 | ? |
IIRFilterNode() constructor |
551 | 551 | ? | 53 | No | 42 | ? |
getFrequencyResponse |
49 | 49 | Yes | 50 | No | 36 | ? |
1. Before version 59, the default values were not supported.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/IIRFilterNode