Observing time in SMPTE

Jan 5, 2012 at 1:52am

Observing time in SMPTE

I feel stupid but it’s late :-)
I’m want something like a “Big Counter” as we can found in many DAW, in Live. I want to monitor the time in SMPTE.
With MFL, we can observe the current_song_time in Bar/Beat/Tick but not in time (I now there’s something like a “get_current_smpte”… but it’s a “get”… and my mouse clicking is not fast enough to update it at a inhuman frame rate :-).
So, I divide the “bar beat tick” by 200. But, as I reach a minute, off course I’m having 0.6 instead of 1. So what’s the good math behind this?
Actually I need the math to calculate it to common SMPTE frames, at least 24, 25 and 30 ifps.

Jan 5, 2012 at 11:03am

I would simply poll the function ‘get_current_smpte…’ with metro.
(note that observers do basically the same internally)

– Pasted Max Patch, click to expand. –
Jan 9, 2012 at 11:36pm

Thanks dear Broc.
Have you noticed that Live timing is quite strange? The first image is not 40ms long as it should be in 25/ifps, but 20ms. Moreover the smpte is not exactly time aligned to the ifps time indocators. (I hope you understand my english).

Jan 10, 2012 at 10:55am

Yes, the timing of Live API seems a bit “sloppy” by design (with variations up to 50ms).

For perfect sync with Live you need using [transport] or [plugsync].
Here is a patch that calculates SMPTE from the beats (and tempo) output of plugsync.

– Pasted Max Patch, click to expand. –
Jan 10, 2012 at 5:08pm

Thanks again Broc, you rock!


You must be logged in to reply to this topic.