Forums > MaxMSP

pattrbackward

March 14, 2006 | 8:52 pm

the pattrforward object is another highlight, which solves some of my
recent problems to seperate UI objects and other parts of a patch.
Thank you very much and hurray…
Now I want a similar object, which does the reverse. Namely read values
from a named object in the same manner as pvar does this locally.

To explain what I am after a little patch as example, to get values from
a filtergraph~ object. pvar unfortunately is very limited for this kind
of purpose, I can only use one pvar per object, and its restricted to
the local patch.

There are several ways to approach my vision:
One: enhance pattrforward with additional outlets determined by a second
parameter,
or enhance pattrforward with an attribute @backward 1 to let it send the
values of each outlet preceded by a number (or symbol like "out3")
defining the outlet it belongs to,
or create a seperate pattrbackward object which acts like pvar, but with
the possibility to adress objects outside the original patcher,
or enhance pvar to be able to adress objects with the double colon
synthax and allow it to have multiple pvars accessing the same object.

Just if there is some spare time beside doing the big (endian) port ;-),
but let me know what you think.

all the best

Stefan

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 20 74 620 474;
#P inlet 170 30 15 0;
#P inlet 140 30 15 0;
#P inlet 110 30 15 0;
#P inlet 80 30 15 0;
#P inlet 50 30 15 0;
#P inlet 200 30 15 0;
#P inlet 230 30 15 0;
#P inlet 260 30 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 3;
#P newex 260 50 27 196617 prepend in7;
#P objectname p[7];
#P newex 230 50 27 196617 prepend in6;
#P objectname p[6];
#P newex 200 50 27 196617 prepend in5;
#P objectname p[5];
#P newex 170 50 27 196617 prepend in4;
#P objectname p[4];
#P newex 140 50 27 196617 prepend in3;
#P objectname p[3];
#P newex 110 50 27 196617 prepend in2;
#P objectname p[2];
#P newex 80 50 27 196617 prepend in1;
#P objectname p[1];
#P window linecount 1;
#P newex 50 100 142 196617 pattrforward parent::graph;
#P objectname f;
#P connect 11 0 0 0;
#P fasten 1 0 0 0 85 95 55 95;
#P fasten 3 0 0 0 145 95 55 95;
#P fasten 4 0 0 0 175 95 55 95;
#P fasten 5 0 0 0 205 95 55 95;
#P fasten 6 0 0 0 235 95 55 95;
#P fasten 7 0 0 0 265 95 55 95;
#P fasten 2 0 0 0 115 95 55 95;
#P connect 12 0 1 0;
#P connect 13 0 2 0;
#P connect 14 0 3 0;
#P connect 15 0 4 0;
#P connect 10 0 5 0;
#P connect 9 0 6 0;
#P connect 8 0 7 0;
#P pop;
#P newobj 437 82 192 196617 p var graph 8;
#P comment 620 46 35 196617 Q or S;
#P flonum 619 60 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 571 60 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 523 60 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 3;
#P comment 523 23 46 196617 cutoff or center freq;
#P window linecount 2;
#P comment 573 34 39 196617 gain (linear);
#P user umenu 377 59 70 196647 1 64 75 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 linecount 1;
#P comment 672 208 53 196617 bandwidth;
#P comment 550 208 29 196617 gain;
#P comment 489 208 27 196617 freq;
#P comment 611 208 35 196617 Q or S;
#P flonum 672 192 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 611 192 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 550 192 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 489 192 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 463 272 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 524 272 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 585 272 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 646 272 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P flonum 707 272 47 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 376 269 39 196617 *~ 0.1;
#P newex 376 214 35 196617 noise~;
#P newex 376 247 79 196617 biquad~;
#P newex 463 249 254 196617 unpack 0. 0. 0. 0. 0.;
#P newex 376 298 29 196617 dac~;
#P user filtergraph~ 37 93 255 124 3 9 0. 22050. 0.0625 16. 1 1 1 0 0 1 1;
#X frgb 193 193 255;
#X brgb 233 233 255;
#X rgb2 0 0 0;
#X rgb3 130 130 130;
#X rgb4 0 0 0;
#X rgb5 118 121 166;
#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 1 1 0 0 637. 1.11 0.5 0. 22050. 0.0001 16. 0.5 25.;
#X done;
#P objectname graph;
#P newex 463 132 166 196617 pvar graph 7;
#P connect 5 0 4 0;
#P connect 4 0 6 0;
#P connect 6 0 2 0;
#P connect 0 0 4 1;
#P connect 6 0 2 1;
#P connect 20 1 27 0;
#P connect 0 0 3 0;
#P connect 3 0 11 0;
#P connect 0 1 12 0;
#P connect 3 1 10 0;
#P connect 0 2 13 0;
#P connect 23 0 27 5;
#P connect 3 2 9 0;
#P connect 24 0 27 6;
#P connect 0 3 14 0;
#P connect 25 0 27 7;
#P connect 3 3 8 0;
#P connect 0 4 15 0;
#P connect 3 4 7 0;
#P window clipboard copycount 28;

[][] [][][] [][] [][][]
[][][][][][][][][][][][][][][]

Stefan Tiedje
Klanggestalter
Electronic Composition
&
Improvisation

/~~~~~
\ /|() ()|
))))) )| | |( \
/// _/)/ )))))
___/ ///

————————-x—-
–_____———–|———–
–(_|_ —-|—–|—–()—-
– _|_)—-|—–()———–
———-()————x—–

14, Av. Pr. Franklin Roosevelt,
94320 Thiais, France
Phone at CCMIX +33-1-57 42 91 09


March 14, 2006 | 9:42 pm

Thanks for the example patch. Clearly something like this could be
useful. More than that, there’s not much to say. It’s not being worked
on at this time…

jb



grg
March 14, 2006 | 10:05 pm

Am 14.03.2006 um 21:52 schrieb Stefan Tiedje:

> or enhance pvar to be able to adress objects with the double colon
> synthax and allow it to have multiple pvars accessing the same object.

I second that request. An object that would bind to all inlets and
outlets of a ui-object specified by a pattr-path and be itself
invisible to pattrstorage, like a all-inclusive send/receive for all
ins and outs. This would be so useful for designing larger interfaces
without creating spaghetti(mikado?)code, having to route patchcords
through multiple subpatches or attaching send/receives to every ui
object.

best, g.


March 14, 2006 | 10:12 pm

You want the famous – alas yet unknown – "alias" object…

You could do something with global variables, starting with :
/examples/javascript/patcher-scripting/globalvar-example.pat

We would really need an object wich is a copy of another one (inlets
+outlets), wherever it is in any patcher.


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