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.


var audioCtx = new AudioContext();
var iirFilter = audioCtx.createIIRFilter();




getFrequencyResponse() takes as parameters three Float32Arrays:

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


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,