Class BiquadFilterNode
java.lang.Object
com.codename1.media.audio.AudioNode
com.codename1.media.audio.BiquadFilterNode
A second order filter, the Web Audio
BiquadFilterNode: low and high pass,
band pass, shelves, peaking, notch and all pass. Coefficients follow the
specification's formulas and are recomputed per sample only while a
parameter changes. The output has the input's channel count.-
Method Summary
Modifier and TypeMethodDescriptionA detune of the frequency in cents, 0 by default.The cutoff or center frequency in Hz, 350 by default.voidgetFrequencyResponse(float[] frequencyHz, float[] magResponse, float[] phaseResponse) Computes the response of the filter, with the parameters' current values, at each offrequencyHz.getGain()The boost in dB for the shelves and peaking, 0 by default.getQ()The quality factor, 1 by default: resonance in dB for low and high pass, width for band pass, peaking, notch and all pass.getType()The filter type.voidsetType(BiquadFilterType type) Sets the filter type.Methods inherited from class AudioNode
connect, connect, connect, connect, disconnect, disconnect, disconnect, disconnect, disconnect, getChannelCount, getChannelCountMode, getChannelInterpretation, getContext, getNumberOfInputs, getNumberOfOutputs, setChannelCount, setChannelCountMode, setChannelInterpretation
-
Method Details
-
getFrequency
The cutoff or center frequency in Hz, 350 by default.
Returns
the parameter
-
getDetune
A detune of the frequency in cents, 0 by default.
Returns
the parameter
-
getQ
The quality factor, 1 by default: resonance in dB for low and high pass, width for band pass, peaking, notch and all pass. Unused by the shelves.
Returns
the parameter
-
getGain
The boost in dB for the shelves and peaking, 0 by default.
Returns
the parameter
-
getType
The filter type.
Returns
the type
-
setType
Sets the filter type.
Parameters
type: the type
-
getFrequencyResponse
public void getFrequencyResponse(float[] frequencyHz, float[] magResponse, float[] phaseResponse) Computes the response of the filter, with the parameters' current values, at each of
frequencyHz.Parameters
-
frequencyHz: the frequencies to evaluate -
magResponse: receives the linear magnitude at each frequency -
phaseResponse: receives the phase in radians at each frequency
-
-