count total occurences of a number in a coll
Is there an easy way to count the total occurences of a numbers in a coll?
example: a coll containing the following
0, 0 0 1 1 2 2;
1, 1 0 1 2 1 1;
2, 2 0 2 1;
would yield 3 lists (or potentially another coll with 3 indexed lines)
0 4
1 7
2 5
I've made a patch that works but it's really complex and I'm thinking this should be a relatively simple task.
Max Patch
Copy patch and select New From Clipboard in Max.
Here's how I'd approach it. The numbers to count are hard coded into [zl.sub] objects. I'm sure you could make this more general using [zl.thin], for example.
Wow, that's so much clearer and cleaner than I had (counters banging counters, etc. etc.) Thanks!