Thanks for playing!. The trick I did was recording the buttons I assigned and saving them to a list along with the time tick, while the song played in the game and then save it to json file. I also used time.Time to replace the default TPS so the tempo calculation stays consistent.