How do BPM changes work? #3887
-
Would someone so kindly explain to me how the code for BPM changes work in the conduction? I know they come from an array that is on the metadata file, and my issue is that they all have a step time, how do i exactly find out this, the conversion for the time and the step time considering the bpm changes, is confusing!!! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Basically in every BPM change there is a timestamp in milliseconds as to when it happens (with an alias "t"). Upon calling the function After that in each As the last step it just sets the times of how long a measure/beat/step takes based on this calculation. Hope this helps yeah !!! |
Beta Was this translation helpful? Give feedback.
-
thank you so much for the reply!! Up until then i understand, my issue is:
|
Beta Was this translation helpful? Give feedback.
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 usingFlxG.sound.music.length
as the function parameter lolCurrent Time in Steps is calculated as such (according to the constructor's update function)