The math device should be unnecessary. Since you have that note trigger impulse, you simply can automate the speed of the “table” LFO, setting it back to circular. Then you also can normally reset that LFO. Only in a short test, it advances always by 1/3 of a measure, not 1/4.
partypoopers.xrnt (6.5 KB)
Ah, interesting, a 24 step grid will work, or setting to 16 TPL.