pvar + bpatcher issue ?

Jan 23, 2008 at 6:09pm

pvar + bpatcher issue ?

cant [pvar] work with bpatchers ? can a bpatcher become an object [pvar] sees and talks with ?
i have a srange behaviour :
sending a bang from a [pvar] to a bpatcher does not work but receiving a bang from the bpatcher to the [pvar] works as expected …
check this patch for a clearer idea of what i mean :

main patch :

#P window setfont “Sans Serif” 9.;
#P window linecount 4;
#P comment 265 168 100 196617 but cicking in the Bpatcher returns a bang to pvar as expected;
#P button 149 87 15 0;
#P button 462 241 15 0;
#P button 462 182 15 0;
#P window linecount 1;
#P newex 462 210 60 196617 pvar myBP;
#P bpatcher 149 126 106 118 -51 -52 bang_BP 1;
#P objectname myBP;
#P window linecount 3;
#P comment 482 162 100 196617 clicking here , nothing happens in the BPatcher;
#P connect 2 0 4 0;
#P connect 3 0 2 0;
#P connect 5 0 1 0;
#P window clipboard copycount 7;

BPatcher :

#P outlet 69 151 15 0;
#P inlet 69 58 15 0;
#P button 69 83 58 0;
#P connect 0 0 2 0;
#P connect 1 0 0 0;
#P window clipboard copycount 3;

#35490
Jan 24, 2008 at 7:39am

karl-otto von oertzen schrieb:
> cant [pvar] work with bpatchers ? can a bpatcher become an object [pvar] sees and talks with ?
> i have a srange behaviour :
> sending a bang from a [pvar] to a bpatcher does not work but receiving a bang from the bpatcher to the [pvar] works as expected …
> check this patch for a clearer idea of what i mean :

Yes I came acorss this as well, the bang isn’t sent to the patch inside
bpatcher, but to the bpatcher object itself. The pattrforward helpfile
explains that if you look into the inlets subpatcher. Pattrforward is
also the solution to this problem.

Not to compromise my beer with Jeremy, i’ll propose today, as feature
request, that we want a pattrvar object with possibly as many outputs
AND inputs as the object we connect to…

#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P message 191 148 55 196617 offset -40 -50;
#P window linecount 1;
#P message 284 148 92 196617 inx offset -40 -50;
#P message 268 127 77 196617 offset -40 -50;
#P message 176 127 77 196617 offset -10 -10;
#P button 248 233 15 0;
#P button 57 83 15 0;
#P button 248 155 15 0;
#P bpatcher 57 122 104 129 -40 -50 bang_BP 1;
#P objectname myBP;
#P newex 248 189 97 196617 pattrforward myBP;
#P newex 248 212 59 196617 pvar myBP;
#P fasten 9 0 0 0 196 209 253 209;
#P fasten 8 0 1 0 289 183 253 183;
#P fasten 7 0 1 0 273 183 253 183;
#P fasten 6 0 0 0 181 209 253 209;
#P connect 0 0 5 0;
#P connect 3 0 1 0;
#P connect 4 0 2 0;
#P window clipboard copycount 10;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#121047
Jan 24, 2008 at 8:53am

herzlichen Dank Herr Tiedje :)
that solves it indeed .

i am not sure Jeremy wants us to be too pushy these days , i am sure he has enough on is plate right now, but maybe not enough in his glass…
so maybe with some beer..
or some schnaptz …
we could …
ask for …

Stefan, you say it :)

Quote: Stefan Tiedje wrote on Thu, 24 January 2008 08:39

>
> Yes I came acorss this as well, the bang isn’t sent to the patch inside
> bpatcher, but to the bpatcher object itself. The pattrforward helpfile
> explains that if you look into the inlets subpatcher. Pattrforward is
> also the solution to this problem.
>
> Not to compromise my beer with Jeremy, i’ll propose today, as feature
> request, that we want a pattrvar object with possibly as many outputs
> AND inputs as the object we connect to…
>
> #P window setfont “Sans Serif” 9.;
> #P window linecount 2;
> #P message 191 148 55 196617 offset -40 -50;
> #P window linecount 1;
> #P message 284 148 92 196617 inx offset -40 -50;
> #P message 268 127 77 196617 offset -40 -50;
> #P message 176 127 77 196617 offset -10 -10;
> #P button 248 233 15 0;
> #P button 57 83 15 0;
> #P button 248 155 15 0;
> #P bpatcher 57 122 104 129 -40 -50 bang_BP 1;
> #P objectname myBP;
> #P newex 248 189 97 196617 pattrforward myBP;
> #P newex 248 212 59 196617 pvar myBP;
> #P fasten 9 0 0 0 196 209 253 209;
> #P fasten 8 0 1 0 289 183 253 183;
> #P fasten 7 0 1 0 273 183 253 183;
> #P fasten 6 0 0 0 181 209 253 209;
> #P connect 0 0 5 0;
> #P connect 3 0 1 0;
> #P connect 4 0 2 0;
> #P window clipboard copycount 10;
>
> —
> Stefan Tiedje————x——-
> –_____———–|————–
> –(_|_ —-|—–|—–()——-
> — _|_)—-|—–()————–
> ———-()——–www.ccmix.com
>
>
>
—————————————————-

#121048
Jan 24, 2008 at 10:06pm

Quote: Stefan Tiedje wrote on Wed, 23 January 2008 23:39
—————————————————-
>
> Not to compromise my beer with Jeremy, i’ll propose today, as feature
> request, that we want a pattrvar object with possibly as many outputs
> AND inputs as the object we connect to…
>

Nice loophole. If you play this right, maybe you can get an additional beer for not mentioning pattrvar for a while :)

Really though, I like this pattrvar idea better than having a separate pattrforward and that… unnameable object.

A while back I asked for pvar to support attaching to objects that aren’t in the same patch using pattrforward syntax. The difference is pvar doesn’t show up in the pattrstorage list. Having the choice seems useful – sometimes I just need remote messaging and don’t want to add yet another pattr to a large patch. Maybe pattrvar could handle both cases, with a @visible attribute or something.

-Adam

#121049
Jan 25, 2008 at 9:11am

Adam Murray schrieb:
> A while back I asked for pvar to support attaching to objects that
> aren’t in the same patch using pattrforward syntax.

I do have a bad hack in my abhaXions for that purpose, but its based on
forward and receive. That would not give the nice clear namespace
differentiation that a pattrvar would give. Have a look at it, its
actually two abhaXions called svar/rvar…

Stefan

svar:

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 211 66 29 196617 t b s;
#P inlet 211 43 15 0;
#P newex 145 66 63 196617 zl slice 1;
#P newex 145 43 63 196617 patcherargs;
#P newex 28 146 100 196617 sprintf set %s_%s;
#P newex 28 95 100 196617 sprintf send %s-%s;
#P inlet 127 43 15 0;
#P newex 28 168 100 196617 receive;
#P newex 28 118 100 196617 forward;
#P inlet 14 43 15 0;
#P outlet 28 192 15 0;
#P connect 9 0 10 0;
#P connect 7 0 8 0;
#P fasten 8 1 5 1 203 91 123 91;
#P fasten 8 1 6 1 203 142 123 142;
#P fasten 10 1 6 1 235 142 123 142;
#P fasten 10 1 5 1 235 91 123 91;
#P connect 3 0 0 0;
#P connect 6 0 3 0;
#P fasten 8 0 5 0 150 87 33 87;
#P fasten 8 0 6 0 150 138 33 138;
#P fasten 4 0 6 0 132 138 33 138;
#P fasten 10 0 5 0 216 87 33 87;
#P fasten 10 0 6 0 216 138 33 138;
#P connect 5 0 2 0;
#P fasten 1 0 2 0 19 115 33 115;
#P fasten 4 0 5 0 132 87 33 87;
#P window clipboard copycount 11;

rvar:

#P outlet 218 176 15 0;
#P window setfont “Sans Serif” 9.;
#P window linecount 2;
#P newex 218 130 43 196617 prepend set;
#P outlet 165 176 15 0;
#P window linecount 1;
#P newex 231 43 29 196617 t b s;
#P inlet 231 20 15 0;
#P window linecount 2;
#P newex 165 130 45 196617 prepend setname;
#P window linecount 1;
#P newex 165 43 63 196617 zl slice 1;
#P newex 165 20 63 196617 patcherargs;
#P newex 50 130 98 196617 sprintf set %s-%s;
#P newex 50 74 98 196617 sprintf send %s_%s;
#P inlet 147 20 15 0;
#P newex 50 152 98 196617 receive;
#P newex 50 97 98 196617 forward;
#P inlet 36 20 15 0;
#P outlet 50 176 15 0;
#P connect 10 0 11 0;
#P connect 13 0 14 0;
#P fasten 8 1 5 1 223 70 143 70;
#P fasten 8 1 6 1 223 125 143 125;
#P connect 8 1 13 0;
#P fasten 4 0 5 0 152 65 55 65;
#P fasten 4 0 6 0 152 120 55 120;
#P fasten 4 0 9 0 152 120 170 120;
#P fasten 4 0 13 0 152 120 223 120;
#P fasten 9 0 0 0 170 173 55 173;
#P connect 9 0 12 0;
#P fasten 8 0 5 0 170 65 55 65;
#P fasten 8 0 6 0 170 120 55 120;
#P connect 8 0 9 0;
#P connect 7 0 8 0;
#P fasten 11 1 5 1 255 70 143 70;
#P fasten 11 1 6 1 255 125 143 125;
#P connect 3 0 0 0;
#P connect 6 0 3 0;
#P fasten 11 0 5 0 236 65 55 65;
#P fasten 11 0 6 0 236 120 55 120;
#P connect 5 0 2 0;
#P fasten 1 0 2 0 41 94 55 94;
#P window clipboard copycount 15;

rvar.help:

#P window setfont “Sans Serif” 9.;
#P number 153 378 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P window linecount 1;
#P newex 153 356 139 196617 receive remotevar_Patch_B;
#P number 153 335 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 153 313 139 196617 receive remotevar_Patch_A;
#P user umenu 137 180 50 196647 1 64 196 1;
#X add ” “;
#X add Patch_A;
#X add Patch_B;
#P number 41 335 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 41 313 109 196617 receive remotevar_;
#P user umenu 73 180 62 196647 1 64 196 1;
#X add remotevar;
#X add remotepot;
#P user dial 41 61 34 34 128 1 0 0 223 270 1 1. 170 170 170 221 221 221
120 120 120 225 225 225 0 0 0 0 0 0;
#P objectname remotepot;
#P window linecount 2;
#N vpatcher 340 422 658 695;
#P window setfont “Sans Serif” 9.;
#P user umenu 153 122 59 196647 1 64 138 1;
#X add remotevar;
#X add remotepot;
#P number 116 172 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 116 122 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P user umenu 87 50 59 196647 1 64 66 1;
#X add remotevar;
#X add remotepot;
#P number 50 100 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 50 50 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 50 75 124 196617 svar remotevar;
#P newex 116 147 124 196617 svar remotevar Patch_B;
#P connect 2 0 1 0;
#P connect 1 0 3 0;
#P connect 4 1 1 1;
#P connect 5 0 0 0;
#P connect 0 0 6 0;
#P connect 7 1 0 1;
#P pop 1;
#P newobj 41 261 144 196617 p another patcher to control the same pvar;
#P window linecount 1;
#N vpatcher 342 100 660 373;
#P window setfont “Sans Serif” 9.;
#P number 155 151 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 155 101 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 155 126 123 196617 svar remotevar Patch_A;
#P number 50 189 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 50 138 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 50 164 91 196617 svar remotepot;
#P number 50 100 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P number 50 49 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 50 75 91 196617 svar remotevar;
#P connect 1 0 0 0;
#P connect 0 0 2 0;
#P connect 4 0 3 0;
#P connect 3 0 5 0;
#P connect 7 0 6 0;
#P connect 6 0 8 0;
#P pop 1;
#P newobj 41 236 144 196617 p patcher to control the pvar;
#P newex 41 203 29 196617 pvar;
#P number 41 102 34 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P objectname remotevar;
#P newex 73 203 114 196617 rvar remotevar;
#P window linecount 8;
#P comment 86 61 184 196617 with svar and rvar its possible to have a
pvar-like behaviour but working also from other patchers. The middle
inlet will change the objects reference , the right inlet can be used
to define a remote patcher. The internal send and receive objects have
just a combined name.;
#P connect 10 1 1 2;
#P connect 13 0 14 0;
#P connect 11 0 12 0;
#P connect 7 1 1 1;
#P connect 3 0 1 0;
#P connect 8 0 9 0;
#P connect 1 0 3 0;
#P window clipboard copycount 15;


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com

#121050

You must be logged in to reply to this topic.