Forums > MaxMSP

Graphical interface for a biquad filter, problems…

March 2, 2011 | 9:48 pm

Hello,

I’m triying to build a GUI for a single Biquad filter (using a biquad~ object), using only peaknotch mode.

I have the following requirements:

- having number boxes to enter frequency, gain, q
- having a gui to do the EQ (obviously i’m using the filtergraph~ object for that)
- having the same aforementioned number boxes updating while tweaking the filtergraph

So far I can’t find a way to achieve this (tried a lot of things since about 3 hours..)

I can do that for a gain~ object (either use the fader, or type in the number boxe that display the fader position)
But can’t find a way with filtergraph…

Any idea would be much appreciated.


March 3, 2011 | 12:08 am

You can patch number boxes to the last three inlets and connect the second, third and fourth outlets with a [prepend set] between each which should mean they keep each other updated.


March 3, 2011 | 8:41 am

Thanks for your answer!

unfortunatly, it doesn’t work, because the gain and Q inlet do not understand the set parameter.
In fact only the frequency inlet does understand it and it wants after a message with the three informations: Freq, Gain, Q.
Then it seems to be no big deal, I use a pack obect to pack freq, gain, Q, then use the prepend set object, and route that into the freq inlet.

the problem is that then if you type a number into the freq, gain, Q float boxes, only the Freq does refresh the value into the filtergraph object. Gain and Q have no effect.
I guess it is because they are not sent in the left most inlet of the pack object, and hence do not trigger a message output when changed.
So I used a trigger object: t b f for Gain, and one for Q, so that a change of gain and Q does trigger a message.

Problem is then that one cannot move any more the Gui of filtergraph to change an EQ!

So back to the beginning.

see both examples here:

– Pasted Max Patch, click to expand. –

March 3, 2011 | 9:54 am

I meant with a [prepend set] into each number box. Perhaps an example demonstrates better:

– Pasted Max Patch, click to expand. –

March 3, 2011 | 10:13 am

indeed your exemple works…

I really wonder what I did before, because it seems I tried the exact same thing and that it didn’t worked at that time, hence my attemps to find workarounds… which means the problem in that case was me!

thanks a lot for sorting me out, I was stuck here for a long time!


March 3, 2011 | 10:26 am

Ok, I got my mistake:

the prepend I used was after the float box, instead of before…

I must say that it doesn’t seems logical to me, but it works, so there is something I don’t get here. I’ll keep digging.


March 3, 2011 | 11:05 am

And now I understand!

set has an action on the float boxes, which do not output in return. and we do not use set on the filtergraph object (which was my mistake before)


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