keep in sync with the beat by calculating drift