# IIRFilterNode WebAudioContext.createIIRFilter(Array.<number> feedforward, Array.<number> feedback)
with Promise style call: Not supported
Mini Program plugin: Not supported
Create an IIR FilterNode
# parameter
# Array.<number> feedforward
An array of floating-point values specifying the feedforward of the transfer function of the IIR filter(molecule)Coefficient.
# Array.<number> feedback
An array of floating-point values specifying the feedback of the IIR filter transfer function(Denominator)Coefficient.
# Return value
# IIRFilterNode
# sample code
let lowPassCoefs = [
{
frequency: 200,
feedforward: [0.00020298, 0.0004059599, 0.00020298],
feedback: [1.0126964558, -1.9991880801, 0.9873035442]
},
{
frequency: 500,
feedforward: [0.0012681742, 0.0025363483, 0.0012681742],
feedback: [1.0317185917, -1.9949273033, 0.9682814083]
},
{
frequency: 1000,
feedforward: [0.0050662636, 0.0101325272, 0.0050662636],
feedback: [1.0632762845, -1.9797349456, 0.9367237155]
},
{
frequency: 5000,
feedforward: [0.1215955842, 0.2431911684, 0.1215955842],
feedback: [1.2912769759, -1.5136176632, 0.7087230241]
}
]
const feedForward = lowPassCoefs[filterNumber].feedforward
const feedBack = lowPassCoefs[filterNumber].feedback
const iirFilter = audioContext.createIIRFilter(feedForward, feedBack)