generally speaking there is no way of preventing playback of an item such as a Audio File In or a Movie File In when starting TouchDesigner. You will have to control the playback state of these operators the same way you are controlling the cueing.
So for example there could be a Execute DAT which runs a callback function onStart which toggles the AudioFileIn’s Play parameter.
Since you would have to somehow control the play state when pulsing the Cue an alternative approach for this could be to make use of the Timer CHOP which in turn would control the Cue Parameter of the Audio File In CHOP.
To make it fairly simple, the Timer CHOP’s Length parameter could be set to something that is definitely bigger than the length of your audio file - let’s say 999 seconds.
On the Output page of the Timer parameters, just have Running and Ready Pulse enabled and now reference the resulting channel on the AudioFileIn CHOP’s Cue parameter with an expression such as: 1-op('null1')['running'] and the ready_pulse channel on the Cue Pulse Parameter: op('null1')['ready_pulse'].
You also want to make sure that the Repeat parameter on the AudioFileIn CHOP is set to Off - otherwise the audiofile would be looping in which case you would want to set a proper length to the Timer CHOP.
Now instead of pulsing the Cue Pulse parameter of the AudioFileIn CHOP, pulse the Start parameter of the Timer CHOP to trigger and retrigger the AudioFileIn Playback.
Last but not least, you still need to make sure the Timer CHOP is not playing when starting a file (the state is saved when you save a toe file) so here you would still want to use the Execute DAT and onStart pulse the Initialize parameter of the Timer CHOP.
I hope the attached file illustrates this fairly well.
Cheers
Markus cuePulse.tox (1.4 KB)
Thank you Markus for the thorough discussion as well as a sample .tox, greatly appreciated!
Since I am just looking for simple audio clip triggering or looping audio, with smooth volume changes, it might be easier to split out audio playback into a separate touch instance or an audio program like Ableton, and not worry about sound being affected by loading of the main instance.
if you are just looking for audiolayback without the need of processing or analyzing the audio further, have a look at the Audio Play CHOP which has inputs for triggering, volume and pan controls.
Yes, as mentioned in the first post, Audio Play CHOP does not do well with dynamic volume changes, which is the whole origin of my question. It crackles when you change the volume over time.