[PD] Re: Segmented Patch Chords? PVar / PV?

Frank Barknecht fbar at footils.org
Tue Feb 14 12:34:47 CET 2006


Hallo,
Item State hat gesagt: // Item State wrote:

> thanks for the snippet ; after an initial confusion
> (my PD RC7 was thinking the list object is a bang
> object?!) i got a recent build and it works ; very
> perspicuous!

You could also use the external [any] from IEMlib instead. The
"pvar.pd" is just a snippet to give you an idea. If you don't want to
"pollute the symbol-table" too much with lots of send/receive pairs,
you could also use a single, global send/receive and then do a [route
$1] inside. 

This has an additional advantage: It allows to built a simple state
saving mechanism using only builtin objects. I illustrated all that in
the next two patches.

Instead of [route] it is also possible to use [OSCroute], which is the
approach I used in the Memento state saving system that is at the base
of the RRADical patches.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 758 435 447 393 10;
#X obj 193 26 inlet;
#X obj 193 239 outlet;
#X obj 193 217 list;
#X obj 216 133 r GLOBAL_PVAR;
#X obj 258 106 s GLOBAL_PVAR;
#X obj 216 192 route \$1;
#X obj 258 84 list prepend \$1;
#X obj 193 53 route bang;
#X obj 216 161 list trim;
#X obj 293 221 list;
#X obj 293 241 list prepend \$1;
#X obj 293 195 r GLOBAL_PVAR_SAVE;
#X obj 293 264 outlet;
#X connect 0 0 7 0;
#X connect 2 0 1 0;
#X connect 3 0 8 0;
#X connect 5 0 2 1;
#X connect 5 0 9 1;
#X connect 6 0 4 0;
#X connect 7 0 2 0;
#X connect 7 1 6 0;
#X connect 8 0 5 0;
#X connect 9 0 10 0;
#X connect 10 0 12 0;
#X connect 11 0 9 0;
-------------- next part --------------
#N canvas 336 233 637 450 10;
#X msg 82 111 list one 2 3 4;
#X msg 149 145 bang;
#X msg 264 144 bang;
#X msg 89 143 bang;
#X msg 354 141 bang;
#X obj 342 196 print y2;
#X obj 264 198 print y1;
#X obj 149 195 print x2;
#X obj 82 194 print x1;
#X obj 342 120 pack 0 1 2 3;
#X floatatom 342 99 5 0 0 0 - - -;
#X obj 417 174 r y;
#X obj 417 195 print y-direct;
#X obj 191 253 r GLOBAL_PVAR;
#X obj 191 273 print GLOB;
#N canvas 696 165 512 629 state-saving 0;
#X obj 54 336 cnv 15 400 250 empty empty Restoring 20 12 0 14 -233017
-66577 0;
#X obj 46 49 cnv 15 400 250 empty empty Saving 20 12 0 14 -233017 -66577
0;
#X obj 202 198 textfile;
#X msg 107 130 clear;
#X msg 215 170 print;
#X msg 77 83 save;
#X obj 77 109 t b b;
#X obj 77 244 s GLOBAL_PVAR_SAVE;
#X obj 202 122 list prepend add;
#X obj 202 148 list trim;
#X obj 188 68 rpvar x;
#X obj 158 89 rpvar y;
#X text 72 269 received inside rpvar;
#X obj 124 501 textfile;
#X msg 266 171 write /tmp/pvar.txt;
#X msg 154 444 read /tmp/pvar.txt \, rewind;
#X obj 124 531 s GLOBAL_PVAR;
#X obj 107 443 until;
#X msg 107 422 100;
#X msg 108 380 reload;
#X msg 68 474 print;
#X obj 107 399 t b b;
#X text 156 423 avoid loops. A bang normally also works.;
#X text 119 553 also received inside rpvar;
#X text 242 86 <== add things to store here;
#X connect 3 0 2 0;
#X connect 4 0 2 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 6 1 3 0;
#X connect 8 0 9 0;
#X connect 9 0 2 0;
#X connect 10 1 8 0;
#X connect 11 1 8 0;
#X connect 13 0 16 0;
#X connect 13 1 17 1;
#X connect 14 0 2 0;
#X connect 15 0 13 0;
#X connect 17 0 13 0;
#X connect 18 0 17 0;
#X connect 19 0 21 0;
#X connect 20 0 13 0;
#X connect 21 0 18 0;
#X connect 21 1 15 0;
#X restore 190 336 pd state-saving;
#X obj 82 165 rpvar x;
#X obj 264 168 rpvar y;
#X obj 342 166 rpvar y;
#X obj 149 165 rpvar x;
#X connect 0 0 16 0;
#X connect 1 0 19 0;
#X connect 2 0 17 0;
#X connect 3 0 16 0;
#X connect 4 0 18 0;
#X connect 9 0 18 0;
#X connect 10 0 9 0;
#X connect 11 0 12 0;
#X connect 13 0 14 0;
#X connect 16 0 8 0;
#X connect 17 0 6 0;
#X connect 18 0 5 0;
#X connect 19 0 7 0;


More information about the Pd-list mailing list