coll, data, size order, ms, rearrange

Johnnyc777's icon

Request:

I need a patch that will take values out of coll, process the data, then put it back into another coll.

The first coll would contain the start and end points (in Ms) of parts of a buffer~:

EG:

1, 0 250
2, 250 300
3, 300 700
etc....

as you see the first coll item is 250ms, the second 50ms, and the third 400ms, I need to take the values out of coll and put them into the second coll in size order (which in this case would be coll items 2,1,3)

Does this make sense?
:)

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

Things you'll want to read about: the 'dump' and 'sort' messages to coll. Other things you might need to use: math objects such as - (or !-) to obtain the difference between two values, list order managing objects such as swap and pack. Here's an example.

Johnnyc777's icon

Thank you soooo much you guys; I`ve been pulling my hair out over this one!
Thats exactly what I wanted. :)