Initializing- best practice?

As networks get more complicated it is easy to have a number of CHOPs and other operators that require initialization.
The Execute DAT has an OnStart method but this applies to when TD is launched.
What if you want to initialize everything on frame 1? What would be the best approach?

One good example is the Trigger CHOP. Simply calling pulse() on triggerpulse increments the value.

9/10 times I write an extension to handle all of the set-up and initialization pieces for a custom component or project. You can then pretty reliably decide when you want to re-set your component to a specified state.

2 Likes

this! love this workflow, makes resetting a collection of comps to their default states nice and abstracted away.

1 Like

Thanks. Some operators seem more challenging to initialize. As mentioned the Trigger CHOP I’ve had to manually toggle the Bypass flag to properly reset.

Interesting - I don’t think I’ve seen that problem with trigger CHOPs before. Are there any repeatable circumstances you’ve encountered that make this behavior appear?

You can bypass and un-bypass with Python, so if you were really in a bind you could do something like:

op('trigger1').bypass = True
delayScript = "op('trigger1').bypass = False"
run(delayScript, delayFrames = 2)

In your initialization process.

That’s awesome. Thanks.