Forums > MaxMSP

help with a sequence using gate?


Jun 27 2013 | 1:52 pm

Hi,

I would like to rotate 0s and 1s like so (counting from 0 to 15)

e.g.

1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
etc.

However, my code messes up on the last digit. Im also using 2 gates and think its a bit messy. Would be very grateful if anyone has any ideas how to fix the last digit (when it gets to 15) and also if there are any cleaner ways of doing it.

<code>
-- Pasted Max Patch, click to expand. --

</code>

Cheers

Jun 27 2013 | 2:31 pm

No worries I figured how to do it with ifs and pack,

cheers


mcQ
Jun 27 2013 | 3:12 pm

this may also work with what you wanted.

<code>
-- Pasted Max Patch, click to expand. --

</code>

Jun 27 2013 | 3:41 pm

zl.rot pretty much does this.

<code>
-- Pasted Max Patch, click to expand. --

</code>

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

Forums > MaxMSP