Forums > MaxMSP

coefficients for biquad~

May 22 2010 | 6:38 pm

I’m trying to use biquad~ without the filtergraph~ (so I can cotrol it with a midi controller) by inputing the minimum and maximum coefficients I get from the list of coefficients coming out from filtergraph~’s left outlet, in biquad~’s 3rd, 4th, 5th and 6th inlets, through a zmap object (so I can scale the controller’s values).
The result I get though, is not at all the same as if I use filtergraph. Am I doing something wrong?

May 22 2010 | 10:46 pm

for sure, because minimum and maximum is not enough, it is not at all linear.

the picture below shows one way how to calculate the coefficients for a pass
filter (which i think is similar to what filtergraph does.)

usually you will prefer an interpolated/smoothed signal as input for [biquad~],
which is why you should look into [filtercoeff~].

pre maxmsp 4.3 users can use [hr.filtercoeff~] … or embed a small [filtergraph~]
object in an abstraction.


  1. passcoeff.jpg


May 23 2010 | 6:57 pm

The coefficients for biquad~ are interdependent, and they are calculated by filtergraph~ (or filtercoeff~) based on the filter type, gain, frequency, and Q you provide. So you should use your MIDI controllers to control those parameters, and feed those to filtergraph~ or filtercoeff~. To avoid clicks, you’ll probably want to interpolate between changes using line~ or number~, as shown in this example.

Sep 05 2016 | 4:42 pm

Hi everyone,
this is an old post, but my problem is very close to this topic: filtergraph~ (for cascade~) is very CPU demanding, especially when params messages are [line 0.]…
So the solution (perhaps) is to use directly coefficents into cascade~ (or biquad~) without filtergraph~.
In a webpage ( there are the coefficents formulas.
I tried to build a little example-patch to verify the formulas, but I must admit that the result looks odd: changing params directly on the filtergraph~ with the muose gives different results than passing directly through the formulas, and the worst thing is that the inspector doesn’t recognize that the 3 filters are peaknotch (it says display!)
Please, could you help me to find the mistake?

-- Pasted Max Patch, click to expand. --

Sep 06 2016 | 12:44 am

…perhaps Display means nothing more than filtergraph~ is used as display only?

Sep 06 2016 | 1:35 am

Here an example based on my patch:
I set the following values for the 3 peaknotches: GAIN 9 FC 87 Q2, GAIN 9 FC 397 Q2, GAIN 9 FC 2024 Q2.
When I set these values directly dragging the mouse on the filtergraph~ the resulting coefficents message says:
(1.003445 -1.996091 0.992804 -1.996091 0.996248 1.073582 -1.840507 0.846273 -1.840507 0.919855 1.015189 -1.980275 0.968268 -1.980275 0.983456)
Instead, when I set the values through the formulas (using filtergraph~ as display only), the resulting message says:
(1.005617 -1.993668 0.988204 -1.993668 0.993822 1.025341 -1.968974 0.946786 -1.968974 0.972128 1.120701 -1.790142 0.746542 -1.790142 0.867243)
Well… it’s not SO different, but there is actually a difference.
What do you think about?

Viewing 6 posts - 1 through 6 (of 6 total)

Forums > MaxMSP