Forums > MaxMSP

nstore and coll solutions

May 12, 2006 | 8:20 pm

Hi,

following this thread from last year
http://www.cycling74.com/forums/index.php?t=msg&goto=577 00

I would like to ask if there is any way of using two symbols or a symbol and a number to store and retrieve data in a coll (or a similar solution using another object). In my case, a second coll does not solve the problem, as I use the same numbers associated with different symbols (e.g beans 1, beans 2, apple 1, apple 2 etc).Or perhaps I didnt understand the use of a second coll suggested in the above link…
can somebody clarify?
thanks!
d


May 15, 2006 | 1:57 pm

You need to combine them into one single symbol like beans_1, beans_2…
With quotes (store "apple 1" xyz) you can store, but can’t retrieve with
the symbols (symbol "apple 1" delivers an error message which might be a
bug).

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


May 15, 2006 | 6:17 pm

Thanks Stefan,

I am using counter and sprintf to generate the names (beans 1, beans 2 etc) and combine them with the data (folder paths in this case).Is there a way of inserting the ‘_’ in between, or even getting rid of the space altogeher (thus getting beans1, etc)?

Actually, I just tried sprintf %ld_%s %s and it seems to do the trick. excellent!
d


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