milliseconds to bpm formula
i can only find bpm to milliseconds and i dont remember how to switch around algebraic equasions that have 2 variables.
this is what someone said in a forum:
y = (240,000 * (d / t)) / x
where t is the divisions of a bar (e.g. 16)
and d is the delay time (e.g. 3)
and x is the bpm of your song
y is the delay time in milliseconds
so what would it look like the other way around please.
that formula converted would be x = (240,000 * (d/t)) * y i think but i’ve never seen that formula before for bpm to ms. the bpm to ms formula i use is [expr 60000./$f1] and it’s the same for ms to bpm.
----------begin_max5_patcher---------- 375.3oc4V80aBBCG74xmhll8ny0BNMr21miEyREpZMzVBTyXy3280VfMb+AZ hFmaiGJommk6teWP2E.PKTUrRD7N3CP.XW..3fr.fl8.jfVkjQKczPIJgfI0 nQ0ellUoc3hxVnbpNYMWt5wBVht9niwiwifyt0tF4VCMHv4MeCdp6HTK1bcT 6oH2J3xLl18TIMfKURsjJXN52WvoYcnq1pa4i6vuj+hiOIbL1htOHvtL5H86 hbwfFlD4giC+S4XOLL4RyvKyTlytGuU6p50Y8OLOMSyvFzZH8y4rZgXkJ0LY LCCpbE5MEbFCgHeRAxu0TPxdxXfOU8YU4EvoXy03atZIY3TB6tEOo2TBeRRI x2kR+D0iYdzNHw+yaGS7nbPldATNbbPYb4G+KBNqYwOLrJUaKRZeBsUb369K kUp4RplqjcIQNfzZdZJS18U7BdZthK0Mh.N+KGc9pIa8aXMgOqZx9yFCpIak 3blSS8QSwGglLa1G7JfR8ilS -----------end_max5_patcher-----------
thanks, i had devised (1000/milliseconds)*60 = bpm but that yields slightly less accurate results than your method once i divide the result by 16 or something.
(1000. / milliseconds) * 60. —use all floats for better precision, even if your msec is originally in ints. Same for dividing afterward if you do that.
Also note that sending a float to an int will truncate, not round it. use [round] if needed.