The getFrequencyResponse()
method of the IIRFilterNode
interface takes the current filtering algorithm's settings, and calculates the frequency response, specified by the frequencyHz
array of frequencies.
Its results are stored in two pre-existing 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 its parameters, three Float32Array
s:
- frequencyHz
- An array containing hertz values, which you want from the frequency response.
- magResponse
- An array containing the magnitude of the frequency response from each frequency (hertz) value input. These magnitude values are unitless.
- phaseResponse
- An array containing the phase of the frequency response from each frequency (hertz) value input. These phase values are 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
Tags:
Contributors to this page:
bunnybooboo,
jpmedley
Last updated by:
bunnybooboo,