If one might ask, what is this problem that leads you mess around so much with timers? For music, useful beats usually don't exceed 300 bpm which are rather puny 5Hz. You can usually deal with those without the need to resort to all those rigmaroles.
Korman