ok, so here are all the divisors you are using with T, broken into to primary numbers:
4 = 2 * 2
12 = 2 * 2 * 3
16 = 2 * 2 * 2 * 2
20 = 2 * 2 * 5
24 = 2 * 2 * 2 * 3
32 = 2 * 2 * 2 * 2 * 2
96 = 2 * 2 * 2 * 2 * 2 * 3
if you want all modulo operations to “reset” at the same time you need to use the lowest common multiple as your reset point (as it will give 0 for any of the divisors used). the lowest common multiple for the above is a multiplication of all the primary numbers needed to create the divisors: 2 * 2 * 2 * 2 * 2 * 3 * 5 = 480.
your script resets T at 4032, which is not divisible by 480 without a remainder. what likely happens is that once it reaches 4032 the length of the sequence for the divisor of 20 gets shortened, creating the feel of things going out of sync.
just a theory, and doesn’t explain why setting T to 0 doesn’t fix things, but try changing that line to:
T WRAP + T 1 0 479 and see if that helps.
btw, you’re probably using DEL with triggers to make sure er-301 reads the CV correctly? if your CPU load on er-301 is low you can just do that in er-301, might be more convenient - just insert a delay after SC.TR unit and set it to 100% wet, i think 7ms worked for me to get it working reliably.