I have been working on a patch which needs a counter that increments by the value input and splits the output, if count decreases it goes out one side, increases out the other. Fairly simple but I am having issues with restricting its range, mod works wonderfully, but 5 mod 24 is not the same as 5 mod 32, so count gets screwed up if you change the mod, which can and does happen in this patch. Select works but it greatly increases the number of things I need to update when changing the length, can over shoot, gets confused easily and requires more logic to deal with counting by anything but 1/-1 to insure it does reset which just means more objects I need to update when changing length, it becomes a complicated easy to screw up mess quickly. Just looking for some ideas, seem to be trapped in these two paths and can not see anything else, Here is my simple but flawed [mod] based counter to clarify my ramblings.

EDIT: forgot to say, trying to keep it vanilla.

Guess I did not explain as well as I thought and/or my simple patch is not as clear as I thought, yours and mine do the exact same thing, just slightly different methods of failure. The issue is that as the counter gets higher the mod gets off, if the counter is at 76 and the mod is 12, output will be 4, set mod to 22 and now the output will jump to 11 on the next count since 77 mod 22 is 11. So, it needs to be reset often, say everytime it hits 0, but than mine will have the same issue as yours, when mod wraps around the 0 will go to the negative side but it needs to stay on the positive. So, the positive out should go, 0 1 2 3 0 1 2 3 for a mod of four, not stick the 0 on the negative and the negative should wrap from 0 back to 4 if going backwards.



