[PD] reset [list] object (list-abs)

Frank Barknecht fbar at footils.org
Wed Sep 13 18:58:49 CEST 2006


Hallo,
Georg Holzmann hat gesagt: // Georg Holzmann wrote:

> >Now my problem is that when I try to generate a new sequence -the 
> >[last-x  2] still gives me the last two entries of my former  list. (e.g 
> >2 3, 0 1, 1 2)

Better use list-lastx.pd, it's the same as last-x.pd, which will
disappear sometime in the future.

> >How can I reset the list object now-because inside [last-x 2] there is  
> >[list split $1] which I cannot reset with a bang.
> 
> I don't if that's what you want, but when you resend the size (e.g. 2 in 
> your example) the object will be reseted !

Yes, that's the only way currently to reset a list-lastx object. I
guess I will introduce a [f] object after the second inlet, then you
can send a "bang" to that object as well to reset the list without
sending the number. As in attached version.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 119 92 810 481 10;
#X obj 153 175 cnv 15 150 80 empty empty empty 20 12 0 14 -233017 -66577
0;
#X floatatom 370 79 5 0 0 2 change-size - -;
#X obj 326 112 t f b;
#X text 378 110 first reset (b) \, then set new length (f).;
#X text 311 195 Right outlet is responsible to first fill the list
;
#X text 312 211 Left outlet then only lets the smaller list pass.;
#X obj 180 183 list;
#X obj 326 54 inlet;
#X obj 180 149 inlet;
#X obj 180 302 outlet;
#X obj 180 228 list split \$1;
#X obj 326 78 f \$1;
#X connect 1 0 2 0;
#X connect 2 0 10 1;
#X connect 2 1 6 1;
#X connect 6 0 10 0;
#X connect 7 0 11 0;
#X connect 8 0 6 0;
#X connect 10 0 6 1;
#X connect 10 0 9 0;
#X connect 10 2 6 1;
#X connect 11 0 2 0;
-------------- next part --------------
#N canvas 625 327 569 323 10;
#X floatatom 188 118 5 0 0 0 - - -;
#X obj 188 174 print last_x;
#X floatatom 267 119 5 0 0 2 change-size - -;
#X text 124 52 list-lastx: make a list of the last x floats.;
#X obj 188 143 list-lastx 4;
#X msg 286 143 bang;
#X text 328 142 reset stored list;
#X connect 0 0 4 0;
#X connect 2 0 4 1;
#X connect 4 0 1 0;
#X connect 5 0 4 1;


More information about the Pd-list mailing list