Forums > MaxMSP

list of pairs of numbers

March 23, 2011 | 11:32 pm

Hi All,

Im wondering if it is possible to make something like list of pairs of numbers. [1, 2] [2, 3] [x, y] … and store it for example in coll.
So the first element of list would be [1, 2] pair and so on. Thans for your
responses.


March 24, 2011 | 12:19 am

If you have one long list of the pairs you want to store you can seperate them with [zl iter 2] and use a [counter] to create the indexes and then [pack] or [prepend] them into 3 item lists (index, x, y) straight into your [coll] object.

– Pasted Max Patch, click to expand. –


Ch
March 24, 2011 | 12:47 pm

If you want [1 2] [2 3] [3 4], you can use zl stream :

– Pasted Max Patch, click to expand. –

March 24, 2011 | 9:16 pm

Thank you for your responses. But Im afraid I ment something different. I wanted to know how to store the pairs in one line of coll. Something like list consisting of pairs of numbers.


March 24, 2011 | 9:28 pm

Can’t you just pack them?

Without a patch showing what you’re trying to do, it’s hard to give specific advice.


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