How to sync long Audio to an external Video : using smpte or timecode or even udp

phiol's icon

Hi all ,
digging up this old thread https://cycling74.com/forums/transport-mtc-synchronization
and this is something I've been wondering about for a while,
- How to sync long Audio to an external Video

Mentioned in the thread : @source audio "If you want to sync - resync long audio & video playback,
then things become more complicated."  

This is what I would like to do.
Have a video playing on an outside player and have info about it's playhead position come in and update my playhead position.

I almost have something working using LTC timecode that I added to the video track. I am receiving the LTC through blackhole and spat5.ltc.decode~ and updating a groove~ start position every 100ms. (groove~ might not be the best option)

It works but as expected , I am getting click sounds when updating the start position.

what could better to go about it.

thanks in advance

Source Audio's icon

here another option with sfplay

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

realignes if ltc and play position get > 100ms apart.

detects running status.

phiol's icon

Hey Thanks source Audio !

Weirdly your previous reply was deleted ? I have the message in my email but no images and now nothing here. the one where you were using index.

I ended up doing a similar patch using groove~ 
But I quite like the elegance of yours :-)

also , I wouldn't mind seeing your previous one

Thanks a lot

phiol's icon

update:
Actually although your patch is great but after testing I arrive at the same place then my inital problem. If an external source is continuously updating the LTC then it will clip as you update you playhead position. This is to be expected.

The solution is ; to only update the LTC or Playhead position from sender when x event happens .

In my patch, I set that to be when
- the time gets to position 00.00.00.0 or start
- or if there are large leaps or bigger that 1 second are detect from sender. (if user changes playhead position or when loop occurs.
- I also put on reveal start.

I see that you did you same using mouse filter.

Thanks again for your nice patch.


Source Audio's icon

I posted initial one by mistake.

it was option using count and index,

but sfplay is much more efficient for large audio files.

that's why I deleted it after reading again that you talk about long audio.

you wrote:

"If an external source is continuously updating the LTC then it will clip as you update you playhead position. This is to be expected."

are you not having steady LTC signal coming in ?

And is it hardwired audio , not network or whatever ?

the main challenge here is to realign audio in case of too large

offset, but it depends on how tight you want both playbacks to be.

gap of 1000ms could be well disturbing, depending on audio material.

sure one could also add some crossfading for such transitions.

ideally one would drive playback directly with LTC signal,

but I don't know any such object,

maybe one could take signal into gen and generate sample count out of it.

but that is out of my interest.