What is it?
onecount is a control rate Max/MSP external that makes counting from 0 to n-1 once much easier.
In Max, recursive processes are often composed with counters and low priority thread messages. This is fairly trivial, but I often run into annoyance with the way counter counts and the convoluted system for knowing when the loop is at the maximum.
I wanted an object that would effectively create a simple
for loop inside Max, and that when completed sends a bang. Much simpler than gating/using selects to trigger a process that occurs next.
onecount was inspired by constant friction using Alex Harker's
descriptors~ object to recursively anaylse a series of buffers or buffer slices.
How to use
Take the .mxo and place it in your Max path. This can be in packages or a custom location.
onecount takes three possible inputs.
- bang - increases the counter by 1
- reset - resets the counter to 0
- set $1 - sets the maximum count value to an integer appended to the set message.
- The current count
- A bang when the maximum count (minus 1) is reached.
How to compile
The most updated external is for Mac OS only. It can be found in the 'bin' folder.
If you want to edit the code and compile yourself you will need to place the entire repo folder into Graham Wakefield's Maxbuild file structure. I used Oli Larkin's fork for this which includes some nice improvements.
When copying it should be placed in maxbuild/examples/onecount.