list of pairs of numbers

Okram28's icon

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.

Luke Hall's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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.

ch's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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

Okram28's icon

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.

Chris Muir's icon

Can't you just pack them?

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