The math behind time signature values to ticks (metro object)

R_Gol's icon

Max Patch
Copy patch and select New From Clipboard in Max.

In the attached patch I try to understand how can I make a system that takes two values that represent a time signature (the pair of numbers inside the comment box ) and translate them into ticks values in order to feed the two metro objects.

I know that if I would like to make 4/ 6 I can take the value of 4n (480 ticks) and multiply it by 4 then divide it by 6 (320 ticks) so one metro will have the interval of 480 ticks and the other 320 ticks.
What if I would like to calculate other ratios such the ones inside the comment box?
What will be the math I should make in order to calculate the above ? I try to get it by myself with no result.

Thanks

Source Audio's icon

Get rid of transport and n stuff and calculate divisions in ms.
If you need tempo - ticks based timing
than this is the math :
expr 60000. / ($f1*480.) * $f2
$f1 = tempo, $f2 = number of ticks, output = length in ms.
But what is 3/10 ?
length of 3 units of 10 divisions of what ?
A Bar ?
In that case you must get length of bar in ms
by gettings number of ticks in a bar and doing the above calc.
P.S. also don't use translate for ticks to ms or opposite conversion.
It sucks on tempo change

R_Gol's icon

Thanks for your advise.
When I say 3 units of 10 divisions I meant over 1 bar one metro will output 3 bangs and the other 10 bangs if it is make sense..

I will try the math you suggested .


Source Audio's icon

Sure it makes sense what you describe.
I am asking to make sure that I understand everything correctly.
Maybe you need a counter with such divisions ?
I mean for step sequencer ?
It could be easier to have one stream od ticks or ms
ad divide it.
I could post example if you want

R_Gol's icon

When ever you can , example could be great!

Source Audio's icon

example with line

Max Patch
Copy patch and select New From Clipboard in Max.

or transport based

Max Patch
Copy patch and select New From Clipboard in Max.

R_Gol's icon

This is great! not exactly what I had in mind but it takes me to different interesting places! thank you very much for you time and effort !

Source Audio's icon

You are welcome.
I you have questions about things that you had in mind, feel free...