FW: [pluggo] filtergraph saving problem

Jul 28, 2006 at 10:02am

FW: [pluggo] filtergraph saving problem

#26956
Jul 28, 2006 at 11:59am

i seem to remember having similar issues a while ago…

the trick (for me) was to control filtergraph via other max gui objects, which work fine in the pattr world. filtergraph just didnt seem to work, so i ended up using it in display mode just so the user can get some visual feedback.

not really a clean solution, more an easy way round the problem.

j

#81162
Jul 28, 2006 at 12:30pm

That’s what I did too. In the final patch there are two filtergraph with two
cascaded filter each, so I have to use 12 sliders to control the parameters.
These sliders can then be saved and loaded with [pp]. The main problem of this
solution is the following: when you edit the filtergraph directly, the
parameters are not saved.

justin wrote:

> the trick (for me) was to control filtergraph via other max gui objects,
> which work fine in the pattr world. filtergraph just didnt seem to work, so i
> ended up using it in display mode just so the user can get some visual
> feedback.
>
> not really a clean solution, more an easy way round the problem.
>
> j
>

#81163
Jul 28, 2006 at 2:08pm

maybe not made my explanation quite clear enough…

dont use filtergraph~ for the controls, set it to display mode then send it coeffs through filtercoeffs~. it then just provides the user with some visual feedback, but no control.

not quite sure wot the scenario would be if u had more than one filter (cascade~) …

#81164
Jul 28, 2006 at 4:29pm

That’s more or less what I did, though not using filtercoeff~. In this project I
wanted to use filtergraph~ as *saved* control too, unfortunately this doesn’t
seem to be possible yet (see in Pluggo 3.6). To sum up, there are 12 more
sliders in the GUI that are both unwanted and unhandy here, but at least
everything works.

justin :

> maybe not made my explanation quite clear enough…
>
> dont use filtergraph~ for the controls, set it to display mode then send it
> coeffs through filtercoeffs~. it then just provides the user with some visual
> feedback, but no control.
>
> not quite sure wot the scenario would be if u had more than one filter
> (cascade~) …

#81165
Jul 28, 2006 at 6:22pm

Hi,

I think that the problem might be that whenever one of the pp send
something to filtergraph~ it cause it to return output of freq, q and
gain, thereby overwriting the other pp objects that were about to be
sent new values to it.

See if the patch below helps you further. It use two filtergraph~
objects. One is used for display and user interaction only, while the
other one is calculating actual coefficients, and is hidden from the
user. For the first one gain freq and Q is updated using set messages.

Best,
Trond

#P window setfont “Sans Serif” 9.;
#P window linecount 3;
#P comment 230 441 151 196617 < - this one is used for actual calculation
of coefficients , but is hidden to the user;
#P window linecount 2;
#P message 504 409 145 196617 2.282981 -4.565962 2.282981 -1.932481 0.93538;
#P window linecount 1;
#P newex 503 387 62 196617 prepend set;
#P window linecount 2;
#P message 141 591 145 196617 2.277197 -4.554395 2.277197 -1.92736 0.930702;
#P window linecount 1;
#P newex 140 569 62 196617 prepend set;
#P newex 113 646 79 196617 biquad~;
#P window setfont Helvetica 9.;
#P user filtergraph~ 113 429 99 57 21 9 20. 20000. 0.0625 16. 0 1 1 0 0 1 1;
#X frgb 170 170 170;
#X brgb 209 209 209;
#X rgb2 0 0 0;
#X rgb3 130 130 130;
#X rgb4 0 0 0;
#X rgb5 76 108 172;
#X rgb6 210 74 54;
#X rgb7 255 22 22;
#X linmarkers 5512.5 11025. 16537.5;
#X logmarkers 10. 100. 1000. 10000.;
#X nfilters 1;
#X setfilter 0 2 1 0 0 413. 2.360975 0.819228 0. 0. 0. 0. 0. 0.;
#X done;
#P window setfont “Sans Serif” 9.;
#P newex 644 213 62 196617 prepend set;
#B color 1;
#P newex 618 173 62 196617 prepend set;
#B color 6;
#P window setfont Helvetica 9.;
#P user filtergraph~ 462 258 192 78 21 9 20. 20000. 0.0625 16. 0 1 1 0 0
1 1;
#X frgb 170 170 170;
#X brgb 209 209 209;
#X rgb2 0 0 0;
#X rgb3 130 130 130;
#X rgb4 0 0 0;
#X rgb5 76 108 172;
#X rgb6 210 74 54;
#X rgb7 255 22 22;
#X linmarkers 5512.5 11025. 16537.5;
#X logmarkers 10. 100. 1000. 10000.;
#X nfilters 1;
#X setfilter 0 2 1 0 0 384.161957 2.360975 0.819228 0. 0. 0. 0. 0. 0.;
#X done;
#P window setfont “Sans Serif” 9.;
#P newex 592 138 62 196617 prepend set;
#B color 13;
#N pp 4 Q;
#P newobj 244 186 38 196617 pp 4 Q;
#B color 1;
#N pp 3 Gain 0. 8.;
#P newobj 244 144 75 196617 pp 3 Gain 0. 8.;
#B color 6;
#N pp 2 Freq 20 20000;
#P newobj 244 102 100 196617 pp 2 Freq 20 20000;
#B color 13;
#P window linecount 2;
#N pp 1 Type 0 7 choices “Display” “Lowpass” “Highpass” “Bandpass”
“Bandstop” “Peak/Notch” “Low Shelf High Shelf”;
#P newobj 24 44 294 196617 pp 1 Type 0 7 choices “Display” “Lowpass”
“Highpass” “Bandpass” “Bandstop” “Peak/Notch” “Low Shelf High Shelf”;
#P window setfont “Sans Serif” 10.;
#P user umenu 355 59 115 196651 1 64 76 0;
#X add display;
#X add lowpass;
#X add highpass;
#X add bandpass;
#X add bandstop;
#X add peaknotch;
#X add lowshelf;
#X add highshelf;
#X add resonant;
#X add allpass;
#P window setfont “Sans Serif” 9.;
#P comment 662 272 85 196617 < - this one for GUI purpose only;
#P connect 5 0 10 7;
#P lcolor 2;
#P fasten 5 0 9 0 249 210 649 210;
#P lcolor 2;
#P connect 4 0 10 6;
#P lcolor 7;
#P fasten 4 0 8 0 249 170 623 170;
#P lcolor 7;
#P connect 10 0 11 0;
#P connect 10 0 12 0;
#P connect 3 0 10 5;
#P lcolor 14;
#P fasten 3 0 6 0 249 130 597 130;
#P lcolor 14;
#P fasten 1 1 10 0 465 88 118 88;
#P lcolor 6;
#P connect 1 1 7 0;
#P lcolor 6;
#P connect 7 0 14 0;
#P connect 14 0 15 0;
#P connect 12 0 13 0;
#P fasten 7 2 4 0 527 349 192 349 192 139 249 139;
#P lcolor 7;
#P fasten 7 1 3 0 497 342 175 342 175 95 249 95;
#P lcolor 14;
#P fasten 2 0 1 0 29 79 321 79 321 54 360 54;
#P fasten 1 0 2 0 360 80 330 80 330 37 29 37;
#P fasten 7 3 5 0 557 357 210 357 210 180 249 180;
#P lcolor 2;
#P connect 6 0 7 5;
#P lcolor 14;
#P connect 8 0 7 6;
#P lcolor 7;
#P connect 9 0 7 7;
#P lcolor 2;
#P window clipboard copycount 17;

julien breval wrote:
> Hello,
>
> I have some problems for saving and loading the [filtergraph~] shape inside a
> plugin. I finally tried the patch that D. Grosse describes on this page:
> http://www.creativesynth.com/MAXMSP/001-SynthBuildingMSP/sbm_08.html
>
> I’m working on Windows XP with Max 4.5.7 so instead of downloading the *.sit
> file I made a “dummy” version of this patch that contains only this :
> – the [filtergraph~]
> – the [umenu]
> – the [pp] objects 1 to 4 with the same arguments
> – the |capture $1( and |recall $1( system
>
> (behaviour)
> * If I open it as a Max patch, saving and loading with ‘capture’ and ‘recall’
> works normally for creating some “factory presets”
> * Building the *.dll plugin works correctly
> * When I load the plugin to either Cubase or to the [vst~] object inside Max,
> loading a “factory preset” only affects the [umenu] : the cutoff, level and
> quality factor are displayed correctly in the “Parameters” GUI but in the
> “Interface” GUI the filtergraph is not modified. 0ther Max UI objects that I
> tried work normally inside plugins. What’s the problem here ?
>
> Regards,
>
> Julien Breval
>

#81166
Aug 1, 2006 at 3:50am

I recently ran into this same issue with my own lcd interface. Some
parameters would trigger other parameters in order to cause a redraw
in lcd. It worked fine in max, but those that were triggered by a pp1
preset change stuck at 0. I was able to fix this (at least for DP) by
rearranging the pp number order. I doubt this is an option for filter
graph, however. Just pitching in for completeness’ sake.

-ian

On Jul 28, 2006, at 1:22 PM, Trond Lossius wrote:

> Hi,
>
> I think that the problem might be that whenever one of the pp send
> something to filtergraph~ it cause it to return output of freq, q
> and gain, thereby overwriting the other pp objects that were about
> to be sent new values to it.
>
> See if the patch below helps you further. It use two filtergraph~
> objects. One is used for display and user interaction only, while
> the other one is calculating actual coefficients, and is hidden
> from the user. For the first one gain freq and Q is updated using
> set messages.
>
> Best,
> Trond

#81167
Aug 2, 2006 at 2:15pm

On Jul 28, 2006, at 8:22 PM, Trond Lossius wrote:
> See if the patch below helps you further. It use two filtergraph~
> objects. One is used for display and user interaction only, while
> the other one is calculating actual coefficients, and is hidden
> from the user. For the first one gain freq and Q is updated using
> set messages.

strangely, looking at this patch i find that the second filtergraph’s
q is contrained to 1.0 or less…? in fact looking at the message
boxes being sent from both graphs, they aren’t the same at all….?
but the inspectors for both look the same. am i missing something?

Jonathan Segel — 4014 Brookdale Ave. Oakland, CA 94619
MAGNETIC — http://www.MagneticMotorworks.com

#81168

You must be logged in to reply to this topic.