I am currently working on a rhythm game that has notes travelling from the top of the screen down to the bottom, where it reaches a button that when pressed triggers a hit. I have paired the game with background music. However I notice that as I play for a long duration of time, the notes do not collide with the buttons on the beat of the music anymore, and goes out of sync. Here is my code: