Rhythm game question

Has anyone worked on rhythm games, or games that have a rhythm based mechanic?

I’ve been asked for a solution to add quick time rhythm events to a game.

My suggestion was to convert the BPM into seconds, and then run a function in delta seconds to keep track of the beats which can check if buttons are being pressed in time with the music.

The engine is Godot with no middleware.

Thanks!