Best way to guarantee videosynced audio playback

Hello,

What is the best way of making sure that the sound file synced with a movie file will stay sync and playback without stutter? Small fluctuations in fps can affect audio playback.
Should the sound file be played in another instance of Touch Designer ? Will it stay in sync?

What is the divine way to play videosynced audio in Touch?

cheers

I have a few different ways of playing audio in sync with videos in Touch. All with some ups and downsides…

  1. Movie with embedded audio - plays perfectly in sync but could get sound glitches if the framerate goes below the buffer size. There is a relatively new feature though on the audiomovie CHOP that’s a pretty huge bonus called “audio sync offset” which is pretty much the same as delay compensation in a DAW. You can set this number to the negative value of your buffer size in the audiodeviceout CHOP so now you can set the audiodeviceout CHOPs buffersize parameter pretty big and not have latency - if your not using live input sound…

  2. I have a M4L setup that syncs an Ableton audio clip with a movie clip - the up side is pretty much perfect sound, the downside is both Ableton and M4L is needed.

  3. Another is just a straight Max patch the syncs audio to a movie - again though Max is needed…

Ideally you can do it all in one process for easier setup, but if you can’t maintain perfect frame rate you can do exactly what you suggested and run the audio in a separate TouchDesigner .toe process. We do this on a number of large projects, people are usually much more sensitive to pops and glitches in audio than a video-frame being dropped here or there.

Running audio in a separate .toe will ensure that if the frame rate drops in the video and control/logic parts of the system it will not effect audio playback. Since your Movies should be playing back in sequential mode, when frames are dropped the movie will not fall behind in time (ie. it will jump the missed frames, they are literally dropped) and your audio will continue to be in sync. Of course your audio.toe file needs to run without dropping frames, but that is much easier to achieve when its just an audio engine that TouchDesigner is running.

The two processes will still be running on the same computer, so you can get a trigger signal from one Touch process to another very reliable with 1-2 frame latency, this latency can be adjusted for in your logic to keep video and audio in sync.