Controlling counter for sequencer

joseph.rex@gmail.com's icon

I'm making a sequencer and am having trouble with some basic functionality. Basically what I want to do is have a subdiv~ outputting 0-3 and to trigger a counter that stays in phase regardless of changing the length of the sequence (not strictly meaning phase but I want both integers to start at 0 together). To do this I reasoned that on the last count (3) you could send counter 0 into it's 3rd inlet to set it on next trigger and send the new length. But I can't get this to work for the life of me.

Please help me!

Thanks.

Max Patch
Copy patch and select New From Clipboard in Max.

Source Audio's icon

insert small delay after sel 3

but subdiv is not reliable anyway