XML Feeds

.

[maxmsp] alphabetical/numerical sorting...

Emmanuel Jourdan c74-mailinglists at e--j.com
Mon Jun 4 03:51:06 MDT 2007


On 3 juin 07, at 02:42, Martin Ritter wrote:

> This is probably very basic, and I do appologize, but I am not sure  
> how to handle this.
> I have a coll with a bunch of (in this case) pictures in it and  
> would like to arrange them numerically from Pic0.jpeg to  
> Pic33.jpeg. "sort -1 1" doesn't do what I want it to. What am I  
> missing???
> The pics are nicely order in my folder on my desktop but as soon as  
> I read it with the "folder" object, things get scrambled...

You can extract the number with a simple regular expression. In that  
case I'm just looking for a digit "\\d" which appears at least once "+".

ej


#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 53 63 127 196617 t b s clear;
#P newex 304 150 99 196617 loadmess refer toto;
#P user jit.cellblock 304 177 477 294 3 9 1 1 45 17 0 1 1 0 1 0 1 1 1  
0 0 0 255 255 255 0 0 0 0 0 0 191 191 191 0 0 0 215 215 240 1 1 1 0 4  
0 0 0;
#P newex 127 176 75 196617 pack 0 s;
#P newex 111 106 91 196617 t s s;
#P newex 111 141 75 196617 regexp (\\\\d+);
#P newex 111 86 47 196617 zl iter 1;
#P window linecount 2;
#P message 53 198 60 196617 sort -1 -1 \, renumber;
#P window linecount 1;
#P message 53 37 135 196617 titi2.aif tutu11.aif toto1.aif;
#N coll toto 1;
#P newobj 127 303 56 196617 coll toto 1;
#P connect 3 0 5 0;
#P connect 5 0 4 0;
#P connect 5 1 6 1;
#P connect 4 1 6 0;
#P connect 6 0 0 0;
#P connect 2 0 0 0;
#P connect 8 0 7 0;
#P connect 9 1 3 0;
#P connect 9 0 2 0;
#P connect 1 0 9 0;
#P fasten 9 2 0 0 174 86 231 86 231 257;
#P window clipboard copycount 10;



More information about the maxmsp mailing list