[PD] list character count

Frank Barknecht fbar at footils.org
Tue Oct 18 20:27:31 CEST 2005


Hallo,
carmen hat gesagt: // carmen wrote:

> > [list] has lots of magic. It's the best builtin to happen to Pd since,
> > say, 1.5 years. Everyone should upgrade to 0.39 just for [list].
> 
> is there a way to [prepend] without using 2 objects instead of one?

Well, what about an abstraction?

To mimic Max/Cyclone [prepend] as in "list a b c" ==> [prepend set]
==> "set a b c" you need to use [list trim] afterwards. 

However to convert "a b c" to "list set a b c" you only need one [list
prepend set], whereas to get a "list"-list out of Max-[prepend]
requires a conversion using a second object (like [list]). 

See attached patch for an example. Either way you look at it: In one
case, you always need two objects, unless list-semantics totally
change.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 373 388 592 379 10;
#X obj 192 165 prepend set;
#X msg 192 295;
#X msg 256 198 set;
#X obj 300 167 list prepend set;
#X obj 300 272 list trim;
#X msg 300 297;
#X msg 192 109 list a b c;
#X msg 300 110 list a b c;
#X text 256 184 reset:;
#X msg 315 228;
#X msg 192 87 1 2 3;
#X msg 300 87 1 2 3;
#X msg 192 135 x y z;
#X msg 300 136 x y z;
#X msg 215 226;
#X obj 215 204 list;
#X text 383 223 "list set ...";
#X text 388 302 "set ...";
#X text 73 217 "list set ...";
#X text 78 296 "set ...";
#X connect 0 0 1 0;
#X connect 0 0 15 0;
#X connect 2 0 1 0;
#X connect 2 0 5 0;
#X connect 2 0 14 0;
#X connect 2 0 9 0;
#X connect 3 0 4 0;
#X connect 3 0 9 0;
#X connect 4 0 5 0;
#X connect 6 0 0 0;
#X connect 7 0 3 0;
#X connect 10 0 0 0;
#X connect 11 0 3 0;
#X connect 12 0 0 0;
#X connect 13 0 3 0;
#X connect 15 0 14 0;


More information about the Pd-list mailing list