calculating: ms/seconds in (x) amount of bars at (x) tempo (elapsed time)

fhill2000's icon

with the total amount of bars taken from a group of clips and the tempo observed from session's tempo, how can I work out how long these clips will play for in milliseconds or seconds with follow actions?

The idea is to to show the elapsed time of the clips by mapping the result of this calculation to the maximum value on a slider and have a timer output to that slider when the first clip is triggered.
Please advise if there is an easier way to do this...
Thanks!

broc's icon

[translate bbu ms] with input [n 0 0], where n is the number of bars.

fhill2000's icon
Max Patch
Copy patch and select New From Clipboard in Max.

I have total number of beats, not bars. This is how I set it up..
And for sending these numbers to the iPad over OSC, will converting the ms value to an int create less latency?
Thanks!

broc's icon

According to the OSC standard both int and float are sent as 32-bit values. So it doesn't matter.