This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.
The createIIRFilter() method of the BaseAudioContext interface creates an IIRFilterNode, which represents a general infinite impulse response (IIR) filter which can be configured to serve as various types of filter.
Note: The IIRFilterNode() constructor is the recommended way to create a IIRFilterNode; see Creating an AudioNode.
createIIRFilter(feedforward, feedback)
feedforwardAn array of floating-point values specifying the feedforward (numerator) coefficients for the transfer function of the IIR filter. The maximum length of this array is 20, and at least one value must be nonzero.
feedbackAn array of floating-point values specifying the feedback (denominator) coefficients for the transfer function of the IIR filter. This array may have up to 20 members, the first of which must not be zero.
An IIRFilterNode implementing the filter with the specified feedback and feedforward coefficient arrays.
InvalidStateError DOMException
Thrown if all of the feedforward coefficients are 0, or if the first feedback coefficient is 0.
NotSupportedError DOMException
Thrown if one or both of the input arrays exceeds 20 members.
| Specification |
|---|
| Web Audio API> # dom-baseaudiocontext-createiirfilter> |
| Desktop | Mobile | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | |
createIIRFilter |
49 | 14 | 50 | 36 | 14.1 | 49 | 50 | 36 | 14.5 | 5.0 | 49 | 14.5 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createIIRFilter