Is it possible for Audio File In to not autoplay when I open a .toe?

  1. Can an Audio File In not autoplay when it’s loaded when the .toe opens?
  2. I need ‘Cue’ to stay off, because I need cuepulse to work

or… is there a better way to play sound clips on demand which doesn’t handle dynamic volume changes with crackling like the Audio Play OP?

Hi @matijaerceg,

there is also the Play parameter or the Speed parameter you could control separately.

Cheers
Markus

Sorry, could you elaborate? I know about those parameters, but how do they help with preventing autoplay when Touch opens?

Hey @matijaerceg,

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)

1 Like

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.

Hey @matijaerceg ,

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.

Cheers
Markus

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.

ah - I missed that part.
Wondering how that crackle happens.

  • Is your file running at full fps
  • are you controlling the volume via the input or via the volume parameters

thanks
markus

1 - not running at full fps 100% of the time
2 - volume is via the volume parameter of the play chop

Thanks for the information, we’re having a look.

2021.14490+
This build now has smooth output when changing the volume parameter manually.
Thanks for the info.
-Rob

1 Like