[help] main tempo via function sync problem

User:V's icon

hi all,

I'm trying to manage the main tempo with a phasor~ driven by a curve in function, but sometimes it gets out of sync. I've tried some restart and sync tricks, but it still doesn't work.

any suggestions?
thanks!

Tempo_function_X.maxpat
Max Patch