Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. BaseAudioContext
  4. createIIRFilter()

BaseAudioContext: createIIRFilter() method

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.

ThecreateIIRFilter() method of theBaseAudioContext interface creates anIIRFilterNode, which represents a generalinfinite impulse response (IIR) filter which can be configured to serve as various types of filter.

Note:TheIIRFilterNode()constructor is the recommended way to create anIIRFilterNode; seeCreating an AudioNode.

Syntax

js
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 thisarray is 20, and at least one value must be nonzero.

feedback

An array of floating-point values specifying the feedback (denominator) coefficientsfor the transfer function of the IIR filter. This array may have up to 20 members, thefirst of which must not be zero.

Return value

AnIIRFilterNode implementing the filter with the specified feedback andfeedforward coefficient arrays.

Exceptions

InvalidStateErrorDOMException

Thrown if all of thefeedforward coefficients are 0, or if the firstfeedback coefficient is 0.

NotSupportedErrorDOMException

Thrown if one or both of the input arrays exceeds 20 members.

Specifications

Specification
Web Audio API
# dom-baseaudiocontext-createiirfilter

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp