Forums > MaxMSP

Translate ms to beats.bars.units in Liveset with metrum changes?


Sym
January 13, 2014 | 3:06 am

Hey, what would be the best way to get the Beats.Bars.Units position from a miliseconds value in a Liveset with M4L.

When I use the max translate object the ms value and beat value doesnt correspond. Is there any way to grab this value directly from Live?


January 13, 2014 | 5:18 am

You can get ‘property current_song_time’ by observing the live_set. It seems what you get is a beat counter as float number. Do what you want from here. No need for [translate] object.



Sym
January 13, 2014 | 6:07 am

Thanks Stephane, the problem is though the metrum changes. The ms are actually translated from the beatcounter, though I wonder if you have 4/4, then 7/8 etc. how to gain the correct beats:bars:units from the beatcounter?


January 13, 2014 | 6:18 am

Observe ‘property signature_numerator’ and there you go.



Sym
January 13, 2014 | 7:29 am

Thanks for the help Stephane, I really appreciate it!

Though I think the problem is a bit more tricky.Right now if I would calculate the b:b:u from the observed signature_numerator and song_time it would only be based on the last signature change.

However if you have automation in your Liveset, altering between different time-signatures and you want to calculate the b:b:u from the beatcounter value you would have to know and incorporate all signature changes.

I wonder if there is not an easier way to translate the beatcounter to b:b:u so that it goes directly with the one ableton displays?


January 14, 2014 | 1:34 am

It seems to me that something like that would work, because the live.observer for signature denominator will update.

<code>

– Pasted Max Patch, click to expand. –

</code>



Sym
January 16, 2014 | 8:07 am

Hey Stephane, thanks for the patch but the problem is the same. It doesn’t work as soon as you have timesignature changes in Live. I also can grab the internal transport values with tick which works too but only if the whole set is in one metrum (eg no automated changes between 7/4, 4/4, 3/4 etc)

Does anyone has some ideas for this and could join in here? Really would love to solve this.


January 16, 2014 | 9:29 am

I think from the [transport] object you get basically the same bbu as displayed in Live.

<code>

– Pasted Max Patch, click to expand. –

</code>



Sym
January 16, 2014 | 10:59 am

Hey Brok, thanks that’s clear. I wonder though how you can get the bbu for points in time that are not related to the current playing position of live.

For example I have a certain ms values and want to translate them to the bbu in the Ableton Live Set.


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