Forums > MaxMSP

sort lists

November 7, 2011 | 11:42 pm

Hi everyone,

I need to sort lists based on one number of each list.

For example I need to zl sort each list in relation to the second number from low to high like this:

2 300 40
5 100 20
7 200 30

to

5 100 20
7 200 30
2 300 40

Any suggestions?

Thanks!


November 8, 2011 | 12:00 am

The [coll] object can sort stored lists by whichever index you specify:

– Pasted Max Patch, click to expand. –

November 8, 2011 | 1:55 pm

thanks! but I need more something that sorts the 3 lists immediately (no latency), without storing anything.

[attachment=175648,2853]

Attachments:
  1. .jpg

November 8, 2011 | 2:45 pm
– Pasted Max Patch, click to expand. –

November 8, 2011 | 2:45 pm

@oliver

Your request seems a bit naive. How can you sort a sequence of items without collecting them?


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