Here's a vanilla approach using the .n sprintf function of makefilename. Not completely tested...
Matt > On Nov 10, 2009, at 3:47 PM, Roman Haefeli wrote: > >> On Tue, 2009-11-10 at 15:26 -0500, Ivica Ico Bukvic wrote: >>> title says it all. Any external capable of doing this (other than >>> resorting to something like a pyext)? >>> >>> Ico >> >> [symbol yoursymbol( >> | >> | [loadbang] >> | | >> | [symbol( <- empty symbol >> | | >> [symbol2list] <- from zexy >> | >> [list length] >> >> though, i haven't checked, if this approach still works, when the >> incoming symbol contains spaces (or other 'special' characters). >> >> roman > > > That would make a nice object, like [symbollength]. > > .hc > > ---------------------------------------------------------------------------- > > "Making boring techno music is really easy with modern tools," he > says, "but with live coding, boring techno is much harder." - Chris > McCormick > > > > > > > > ------------------------------ > > _______________________________________________ > Pd-list mailing list > [email protected] > to manage your subscription (including un-subscription) see > http://lists.puredata.info/listinfo/pd-list > > > End of Pd-list Digest, Vol 56, Issue 46 > *************************************** >
#N canvas 0 22 382 235 10; #X symbolatom 164 46 10 0 0 0 - - -; #X floatatom 164 182 5 0 0 0 - - -; #X msg 173 69 symbol dog; #X msg 181 94 symbol nugent; #X obj 45 89 makefilename %d; #X msg 45 63 6789; #X obj 164 153 symbollength; #X msg 193 122 symbol e; #X connect 0 0 6 0; #X connect 2 0 6 0; #X connect 3 0 6 0; #X connect 4 0 6 0; #X connect 5 0 4 0; #X connect 6 0 1 0; #X connect 7 0 6 0;
#N canvas 297 111 465 610 10; #X obj 122 443 sel s; #X obj 143 291 makefilename %%.%ds; #X msg 143 318 set \$1; #X obj 48 142 until; #X obj 76 227 + 1; #X obj 33 553 f; #X obj 122 241 symbol; #X obj 48 168 t b b; #X obj 149 493 s \$0-stop; #X obj 122 469 t b b; #X obj 75 104 r \$0-stop; #X obj 192 398 print; #X obj 184 43 inlet; #X obj 184 104 t b b s; #X obj 184 77 route symbol; #X obj 33 574 outlet; #X obj 192 375 spigot 0; #X obj 237 353 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0 1; #X obj 223 134 s \$0-sym; #X obj 122 210 r \$0-sym; #X obj 149 420 r \$0-sym; #X obj 122 352 makefilename; #X text 31 15 find length of symbol by iterating the first n characters ; #X text 276 292 <- sprintf fun; #X text 266 353 <- try this on; #X obj 48 227 f 1; #X msg 138 162 1; #X connect 0 0 9 0; #X connect 1 0 2 0; #X connect 2 0 21 0; #X connect 3 0 7 0; #X connect 4 0 25 1; #X connect 5 0 15 0; #X connect 6 0 21 0; #X connect 7 0 6 0; #X connect 7 1 25 0; #X connect 9 0 5 0; #X connect 9 1 8 0; #X connect 10 0 3 1; #X connect 12 0 14 0; #X connect 13 0 3 0; #X connect 13 1 26 0; #X connect 13 2 18 0; #X connect 14 0 13 0; #X connect 16 0 11 0; #X connect 17 0 16 1; #X connect 19 0 6 1; #X connect 20 0 0 1; #X connect 21 0 0 0; #X connect 21 0 16 0; #X connect 25 0 4 0; #X connect 25 0 5 1; #X connect 25 0 1 0; #X connect 26 0 25 1;
_______________________________________________ [email protected] mailing list UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
