Please note, this is a STATIC archive of website developer.mozilla.org from November 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

IIRFilterNode.getFrequencyResponse()

This article needs a technical review. How you can help.

This article needs an editorial review. How you can help.

The getFrequencyResponse() method of the IIRFilterNode interface takes the current filtering algorithm's settings and calculates the frequency response for frequencies specified in the frequencyHz array of frequencies.

The results are stored in two preexisting output arrays:

  • magResponse receiving the linear magnitude
  • phaseResponse receiving the phase response in radians.

Syntax

var audioCtx = new AudioContext();
var iirFilter = audioCtx.createIIRFilter();
iirFilter.getFrequencyResponse(myFrequencyArray,magResponseOutput,phaseResponseOutput);

Returns

None.

Parameters

getFrequencyResponse() takes as parameters three Float32Arrays:

frequencyHz
An array containing hertz values that you want the frequency response for.
magResponse
An array that will contain the outputted magnitude of the frequency response for each inputted frequency (hertz) value. The magnitude values are unitless.
phaseResponse
An array that will contain the outputted phase of the frequency response for each inputted frequency (hertz) value, measured in radians.

Specifications

Specification Status Comment
Web Audio API
The definition of 'getFrequencyResponse()' in that specification.
Working Draft  

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support 49.0 ? ? ? ?
Feature Android Android Webview Firefox Mobile (Gecko) Firefox OS IE Mobile Opera Mobile Safari Mobile Chrome for Android
Basic support No support 49.0 ? ? ? ? ? 49.0

See also

Document Tags and Contributors

 Contributors to this page: jpmedley
 Last updated by: jpmedley,