audio efficiency issues

I’ve loaded 48 moviefilein TOPs which I’m triggering via midi. I’m currently limiting the system to play 4-8 videos simultaneously but things slow down tremendously when introducing audio playback through 48 audiomovie CHOPS.

I’ve tried directx and ASIO drivers. I’ve also experimented with multiple audiodeviceout CHOPs vs using a math CHOP to combine outputs into a single audiodeviceout. I’m not sure what I’m doing wrong. Would really appreciate some advice on the most efficient way to mix multiple audio channels.

In general I’ve found it easier to set up external audio sequencing software (Samplitude. Ableton etc) due to these stability issues and use Touch purely for video, but it’d be great to be able to do it all in a single TD network.

I discovered I hadn’t set the clone-immune flag on the moviefileins so it was trying to play all 48 files at once which was slowing things down.

I’m still having trouble mixing 48 channels of audio together though. I’m not trying to play them all at once, just route them to the soundcard so I can trigger when needed. I’m using a single audiodeviceout and 4 maths chops adding 12 inputs each, going into a single maths chop before the audio out. ASIO won’t play any audio and directx plays but sputters and stops.

Is there a practical limit to the number of audio channels I can mix in Touch?

There shouldn’t be. Are you dropping frames by chance?

The best way to diagnose would be to incrementally activate the system one piece at a time in different configurations until you find the piece that reliably introduces instability. So for instance, have all the movies playing, and all the audio bypassed, then one by one start un-bypassing audio movie chops. Then try in reverse order and different combinations.

Also, any particular reason you’re using 48 audio movie chops for only 4-8 videos? I’d also experiment, separating the audio into wav files and loading all of them using Audio File In CHOPs, then you just need a little bit of preloading on your videos before you hit play, then trigger both the audio and video at the same time, and you should generally be pretty in line.

thanks Elburz,

Definitely dropping frames.
The project is an AV sampler and I figured it easier to drag in 48 video files and trigger when needed than write the logic to choose 4-8 movies at a time from a larger library, but maybe my approach is half the issue.

I’ve been able to get decent framerates again without dropouts by increasing the deviceout buffer length to .4 secs, but then latency is the issue. I’m triggering TD by midi from an external sequencer which is also playing sounds.

The best results so far have been using 48 cloned containers including audiodeviceouts with a clone-immune moviefilein in each. ASIO doesn’t like it but directx drivers seem to work ok. Maybe I should decide on a maximum polyphony (8-16) and write some logic to change file names when needed.

Audio in TouchDesigner is basically only usable if you don’t drop frames. Once you start dropping frames, all bets are off and you’ll hear stutters and pops and all kinds of stuff.

I’d say it’s worth trying separating the audio as wav files that go with each video file, I’m not too familiar with the audio movie chop.

Generally if we do audio in TouchDesigner, we actually make a separate instance of TouchDesigner that holds just the audio, and then you turn off the window drawing. You can use OSC to send pulses between the instances that trigger your audio and video, but with the chance of not dropping frames, your audio will be much more reliable, but then the messaging is a little more difficult to manage.