How to accurately change BPM with animations?

I’m trying to make an FNF test thing, and I want to make it so the BPM can be entered and the characters will bop accordingly.

Currently system is “ask for bpm number, store in a variable then set the animation speed (in ms) to said variable”

Here’s the project link:

If someone could tell me a way to do this, that would be great

I added a variable that has the bpm in milliseconds while also keeping a separate one for the actual bpm.

hope this helps

assuming you mean changing the BPM of a song, you can now using my extension I just made: https://github.com/c-minusminus/edit-songs/
example usage:
https://makecode.com/_EukFYKWwy5fm