Forums > MaxMSP

recall index from any data

December 1, 2007 | 6:40 pm

Hello,

I would like to store a unknown size list at an index.
Then, when any number of this list comes again, I want the index !

I tryed different objects : I can’t get coll to give me the index from elmts, funbuff can only store 1 elmt for each index, qlist can’t be recalled by index, table can’t store multiple data at index.
Perhaps I’m wrong with these assertions.

Please do you see any way ?
thanks.


December 1, 2007 | 8:43 pm

try this, is with a coll objetc.
hope is whatyou are looking for.
i put also a Coll to try ok?

max v2;
#N vpatcher 147 127 1144 776;
#P window setfont "Sans Serif" 20.;
#P window linecount 1;
#P comment 345 466 159 196628 index of the list;
#P newex 157 266 90 196628 route int;
#P objectname u331000001[2];
#P newex 255 308 41 196628 iter;
#P newex 231 401 38 196628 t 0;
#P number 271 464 68 20 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 271 401 53 196628 gate;
#P newex 484 168 133 196628 t b i 1 length;
#P objectname u331000001[1];
#P number 484 92 68 20 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 255 348 70 196628 sel;
#P newex 255 212 120 196628 uzi;
#N coll try;
#P newobj 255 268 75 196628 coll try;
#P objectname u331000001;
#P comment 569 94 220 196628 number u r looking for;
#P connect 1 0 10 0;
#P connect 3 0 8 0;
#P fasten 5 0 2 0 260 200;
#P fasten 2 2 1 0 370 256 260 256;
#P fasten 5 3 1 0 612 251 260 251;
#P connect 1 0 9 0;
#P connect 9 0 3 0;
#P fasten 5 2 6 0 571 385 276 385;
#P connect 8 0 6 0;
#P connect 6 0 7 0;
#P connect 1 1 6 1;
#P fasten 5 1 3 1 530 316 320 316;
#P connect 10 0 2 1;
#P connect 4 0 5 0;
#P pop;


December 1, 2007 | 10:37 pm

Thanks lorbi,
it is interesting, but if I send it a number’s not stored in the coll, it gives me 5. How to avoid it ?
I’d prefer nothing if a number is not held in the coll, at least not an existing index !


December 1, 2007 | 10:46 pm


December 1, 2007 | 11:11 pm


Viewing 5 posts - 1 through 5 (of 5 total)