Thanks for playing!
@IceFROTTEE wrote the music to a specific tempo - then we repeatedly fire an event when one bar is complete by checking the audio playback time and doing some math with the BPM.
It’s a bit finicky. Very easy to have it go out of sync. To keep it in sync we get the time from the audio track samples directly, and make sure that if we check the time a bit too late (if the update loop misses the exact beat time) we subtract however much time we are over the beat.
So far by doing that the beat events will fire reliably in time with the music. IDEALLY it would have been super cool to use some charting software like Moonscraper but it was a bit too intense to integrate in the time we had :D