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.
Syntax
var iirFilter = AudioContext.createIIRFilter(feedforward, feedback);
Parameters
feedforward
- An 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.
feedback
- An 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.
Return value
An IIRFilterNode
implementing the filter with the specified feedback and feedforward coefficient arrays.
Exceptions
InvalidStateError
- All of the
feedforward
coefficients are 0, and/or the firstfeedback
coefficient is 0. NotSupportedError
- One or both of the input arrays exceeds 20 members.
Specifications
Specification | Status | Comment |
Web Audio APIThe definition of 'createIIRFilter()' in that specification. | Working Draft |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
createIIRFilter
|
Chrome
Full support 49 |
Edge
Full support ≤18 |
Firefox Full support 53 Full support 53 Notes' Originally implemented on |
IE
No support No |
Opera
Full support Yes |
Safari
No support No |
WebView Android
Full support 49 |
Chrome Android
Full support 49 |
Firefox Android Full support 53 Full support 53 Notes' Originally implemented on |
Opera Android
Full support Yes |
Safari iOS
No support No |
Samsung Internet Android
Full support 5.0 |
Legend
- Full support
- Full support
- No support
- No support
- See implementation notes.'
- See implementation notes.
See also
BaseAudioContext.createIIRFilter() by Mozilla Contributors is licensed under CC-BY-SA 2.5.