Skip to content

How do BPM changes work? #3887

Answered by KoloInDaCrib
amyspark-ng asked this question in Q&A
Discussion options

You must be logged in to vote
  1. There is a neat little function in Conductor called getTimeInSteps which returns how many steps there are in the given parameter representing the time in milliseconds. My guess for calculating the total amount of steps would be just using FlxG.sound.music.length as the function parameter lol

  2. Current Time in Steps is calculated as such (according to the constructor's update function)

  • Multiply the beatTime of the last change with 4 (default amount for steps per beat)
  • Take the difference of the song's current position with time change's timestamp and divide it by how much a step lasts in milliseconds (60 divided by current BPM multiplied by 1000 for the ms and then divided by timeSign…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@KoloInDaCrib
Comment options

Answer selected by amyspark-ng
@amyspark-ng
Comment options

@KoloInDaCrib
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants