public class NotchFilter extends IIRFilter
UGen.InputType, UGen.UGenInput
Constructor and Description |
---|
NotchFilter(float freq,
float bandWidth,
float sampleRate)
Constructs a notch filter with the requested center frequency, bandwidth and
sample rate.
|
Modifier and Type | Method and Description |
---|---|
protected void |
calcCoeff()
Calculates the coefficients of the filter using the current cutoff
frequency.
|
float |
getBandWidth()
Returns the band width of this filter.
|
void |
setBandWidth(float b)
Sets the band width of the filter.
|
frequency, printCoeff, process, process, setFreq, uGenerate, validFreq
addInput, getLastValues, patch, patch, patch, printInputs, removeInput, sampleRate, sampleRateChanged, setAudioChannelCount, setSampleRate, tick, unpatch, unpatch
public NotchFilter(float freq, float bandWidth, float sampleRate)
freq
- the center frequency of the band to remove (in Hz)bandWidth
- the width of the band to remove (in Hz)sampleRate
- the sample rate of audio that will be filtered by this filterpublic void setBandWidth(float b)
b
- the band width (in Hz)public float getBandWidth()
protected void calcCoeff()
IIRFilter
b[0]
corresponds to the coefficient b1
.