Description
biquad~ implements a two-pole, two-zero filter using the following equation:
y[n] = a0 * x[n] + a1 * x[n-1] + a2 * x[n-2] - b1 * y[n-1] - b2 * y[n-2]
You can specify the coefficients a0, a1, a2, b1, and b2 as signals or floats (if you make the filter explode by making the b coefficients too high, you can recover (after lowering them) with the message, or by turning the audio on and off).
Examples
Arguments
a0 [float]
Set the initial value for the a0 filter coefficient. If a signal is connected to the second inlet, the coefficient supplied as an argument is ignored.
a1 [float]
Set the initial value for the a1 filter coefficient. If a signal is connected to the third inlet, the coefficient supplied as an argument is ignored.
a2 [float]
Set the initial value for the a2 filter coefficient. If a signal is connected to the fourth inlet, the coefficient supplied as an argument is ignored.
b1 [float]
Set the initial value for the b1 filter coefficient. If a signal is connected to the fifth inlet, the coefficient supplied as an argument is ignored.
b2 [float]
Set the initial value for the b2 filter coefficient. If a signal is connected to the sixth inlet, the coefficient supplied as an argument is ignored.
Attributes
smooth [int] (default: 1)
Toggles the smoothing of filter coeffient changes.
Common Box Attributes
annotation [symbol]
Sets the text that will be displayed in the Clue window when the user moves the mouse over the object.
background [int] (default: 0)
Adds or removes the object from the patcher's background layer.
adds the object to the background layer, removes it. Objects in the background layer are shown behind all objects in the default foreground layer.color [4 floats]
Sets the color for the object box outline.
fontface [int]
Sets the type style used by the object. The options are:
plain
bold
italic
bold italic
Possible values:
0 = 'regular'
1 = 'bold'
2 = 'italic'
3 = 'bold italic'
fontname [symbol]
Sets the object's font.
fontsize [float]
Sets the object's font size (in points).
Possible values:
'8'
'9'
'10'
'11'
'12'
'13'
'14'
'16'
'18'
'20'
'24'
'30'
'36'
'48'
'64'
'72'
hidden [int] (default: 0)
Toggles whether an object is hidden when the patcher is locked.
hint [symbol]
Sets the text that will be displayed in as a pop-up hint when the user moves the mouse over the object in a locked patcher.
ignoreclick [int] (default: 0)
Toggles whether an object ignores mouse clicks in a locked patcher.
patching_rect [4 floats] (default: 0. 0. 100. 0.)
Sets the position and size of the object in the patcher window.
position [2 floats]
Sets the object's x and y position in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its size unchanged.
presentation [int] (default: 0)
Sets whether an object belongs to the patcher's presentation.
presentation_rect [4 floats] (default: 0. 0. 0. 0.)
Sets the x and y position and width and height of the object in the patcher's presentation, leaving its patching position unchanged.
rect [4 floats]
Sets the x and y position and width and height of the object in both patching and presentation modes (if the object belongs to its patcher's presentation).
size [2 floats]
Sets the object's width and height in both patching and presentation modes (if the object belongs to its patcher's presentation), leaving its position unchanged.
textcolor [float]
Sets the color for the object's text in RGBA format.
textjustification [int]
Text Justification
Possible values:
0 = 'left'
1 = 'center'
2 = 'right'
varname [symbol]
Sets the patcher's scripting name, which can be used to address the object by name in pattr, scripting messages to thispatcher, and the js object.
Messages
int
Arguments
The coefficients in inlets 2 to 6 may be specified by a number instead of a signal. If a signal is also connected to the inlet, the number value is ignored.
float
Arguments
list
Arguments
a1 [float]
a2 [float]
b1 [float]
b2 [float]
dictionary
Arguments
clear
signal
yn = a0xn + a1xn-1 + a2xn-2 - b1yn-1 - b2yn-2.
In 2nd inlet: Amplitude coefficient a0, for scaling the amount of the current input to be passed directly to the output.
In 3rd inlet: Amplitude coefficient a1, for scaling the amount of the previous input sample to be added to the output.
In 4th inlet: Amplitude coefficient a2, for scaling the amount of input sample n-2 to be added to the output.
In 5th inlet: Amplitude coefficient b1, for scaling the amount of the previous output sample to be added to the current output.
In right inlet: Amplitude coefficient b2, for scaling the amount of output sample n-2 to be added to the current output. .
stoke
Arguments
a1 [float]
a2 [float]
b1 [float]
b2 [float]
Output
signal
The filtered signal.
See Also
Name | Description |
---|---|
Sound Processing Techniques | Sound Processing Techniques |
buffir~ | buffer-based FIR filter |
cascade~ | Cascaded series of biquad filters |
comb~ | Apply a comb filter effect |
cross~ | Third-order crossover filter |
filtergraph~ | Filter editor |
lores~ | Resonant lowpass filter |
onepole~ | Single-pole lowpass filter |
reson~ | Resonant bandpass filter |
svf~ | State-variable filter with simultaneous outputs |
teeth~ | Comb filter with feedforward and feedback delay control |
Audio Filtering | Audio Filtering |