Forums > MaxMSP

### milliseconds to bpm formula

Feb 25 2010 | 5:58 am

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.

Feb 25 2010 | 6:47 am

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.

``````
-- Pasted Max  Patch, click to expand. --

```
```
Feb 25 2010 | 8:33 pm

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.

Feb 26 2010 | 8:47 am

(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.

Viewing 4 posts - 1 through 4 (of 4 total)

Forums > MaxMSP