[PD] data-s: get + crash

Frank Barknecht fbar at footils.org
Tue Jul 4 00:34:57 CEST 2006


Hallo,
João Miguel Pais hat gesagt: // João Miguel Pais wrote:

> hmm, not exactly. if in the window all even structs are f-teil, and the  
> uneven sek-tick, I will only get the even ones. but I must click through  
> the uneven ones anyway, just no output will come out (is this clear?).  
> this happens when either the previous or both pointers have the f-teil  
> argument.

You may find attached traversal abstraction useful. They will traverse
on a next message through only the pointers specified by the first
argument. So if you use an [until] to bang the [next( message for X
times, you will land at the Xth pointer of the wanted type. Pointers
of different type are automatically skipped.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 485 163 441 524 10;
#X obj 111 34 inlet;
#X obj 111 458 outlet;
#X msg 64 222 next;
#X obj 198 459 outlet;
#X obj 111 259 pointer \$1;
#X obj 283 37 inlet;
#X obj 283 91 makefilename pd-%s;
#X obj 283 65 symbol;
#X msg 283 118 traverse \$1;
#X obj 143 297 b;
#X obj 143 320 delay;
#X obj 198 298 b;
#X connect 0 0 4 0;
#X connect 2 0 4 0;
#X connect 4 0 1 0;
#X connect 4 1 9 0;
#X connect 4 2 11 0;
#X connect 5 0 7 0;
#X connect 6 0 8 0;
#X connect 7 0 6 0;
#X connect 8 0 4 0;
#X connect 9 0 10 0;
#X connect 10 0 2 0;
#X connect 11 0 3 0;
-------------- next part --------------
#N struct test float x float y float test;
#N struct no-test float x float y float no-test;
#N canvas 364 241 723 363 10;
#N canvas 0 0 450 300 score 0;
#X scalar test 80 63 78 \;;
#X scalar test 82 104 91 \;;
#X scalar no-test 92 97 29 \;;
#X scalar no-test 129 48 62 \;;
#X scalar no-test 163 188 1 \;;
#X scalar test 194 89 35 \;;
#X restore 598 111 pd score;
#N canvas 141 232 632 393 test 0;
#X obj 448 287 pointer;
#X obj 356 240 until;
#X msg 330 287 12;
#X msg 448 260 traverse pd-score \, bang;
#X obj 376 213 t f b;
#X msg 376 190 3;
#X obj 154 89 struct test float x float y float test;
#X obj 137 126 drawnumber test 0 0 900 test=;
#X obj 327 309 append test x test;
#X obj 348 261 t b b;
#X obj 372 282 random 100;
#X connect 0 0 8 2;
#X connect 1 0 9 0;
#X connect 2 0 8 0;
#X connect 3 0 0 0;
#X connect 4 0 1 0;
#X connect 4 1 3 0;
#X connect 5 0 4 0;
#X connect 9 0 2 0;
#X connect 9 1 10 0;
#X connect 10 0 8 1;
#X restore 599 140 pd test;
#N canvas 0 0 749 502 no-test 0;
#X obj 154 89 struct no-test float x float y float no-test;
#X obj 41 130 drawnumber no-test 0 0 0 notest=;
#X obj 423 273 pointer;
#X obj 331 226 until;
#X msg 305 273 12;
#X msg 423 246 traverse pd-score \, bang;
#X obj 351 199 t f b;
#X obj 323 247 t b b;
#X obj 302 295 append no-test x no-test;
#X msg 350 174 3;
#X obj 346 268 random 100;
#X connect 2 0 8 2;
#X connect 3 0 7 0;
#X connect 4 0 8 0;
#X connect 5 0 2 0;
#X connect 6 0 3 0;
#X connect 6 1 5 0;
#X connect 7 0 4 0;
#X connect 7 1 10 0;
#X connect 9 0 6 0;
#X connect 10 0 8 1;
#X restore 600 164 pd no-test;
#X msg 81 134 next;
#X obj 450 195 print NO-EOL;
#X obj 188 192 print EOL;
#X msg 81 103 bang;
#X msg 322 141 next;
#X msg 322 110 bang;
#X text 65 47 pointer messages;
#X msg 188 101 score;
#X text 158 77 subpatch to traverse - without "pd-"!;
#X msg 450 108 score;
#X obj 81 161 ds-traverse test;
#X obj 322 168 ds-traverse no-test;
#X msg 595 62 sort;
#X obj 595 85 s pd-score;
#X obj 81 262 get test test;
#X floatatom 81 286 5 0 0 0 - - -;
#X floatatom 322 287 5 0 0 0 - - -;
#X obj 322 266 get no-test no-test;
#X obj 81 307 print TEST;
#X obj 322 306 print NO-TEST;
#X connect 3 0 13 0;
#X connect 6 0 13 0;
#X connect 7 0 14 0;
#X connect 8 0 14 0;
#X connect 10 0 13 1;
#X connect 12 0 14 1;
#X connect 13 0 17 0;
#X connect 13 1 5 0;
#X connect 14 0 20 0;
#X connect 14 1 4 0;
#X connect 15 0 16 0;
#X connect 17 0 18 0;
#X connect 18 0 21 0;
#X connect 19 0 22 0;
#X connect 20 0 19 0;


More information about the Pd-list mailing list