Base Output - Very unexpected behaviour

Well, I was following this audio-reactivity tutorial when I noticed a strange behavior in my base output. The given patch creates concentric circles according to keystrokes (Press 1) as a substitute for kick detections. It can display a preset number of circles simultaneously, which works as expected.

So far, so good. To keep my setup nice and tidy, I put everything into a base comp. This is where things start to get strange. The mysterious thing is that when I attach an op-viewer or null to the output of my base comp, it shows something completely different than what I see on the output side inside of my base. When I go inside the base, all keystrokes create a circle (up to 5 simultaneously). Outside the base, only one circle is displayed. Now we are getting crazy: However, when I split my pane layout and look simultaneously at the network inside and the network outside of my base comp, both outpus visualize the same (all of my keystrokes as supposed). Concluding it just works as expected, when i activly look what is happening inside the basecomp.

Now I ask myself: Is it a bug? Is it a feature? What to to about it? :smile: Please send help.

Circles.toe (5.1 KB)

This can happen when mixing script triggering and CHOPs. TouchDesigner will only cook a node if another node connected to it requests its data, or if you are viewing the data in the viewer directly, since it needs to calculate it to display it. This is how TouchDesigner can self-optimize cooking in networks, when something is not in use it does not cook.
In your example, the Count CHOP is at the end of a chain and nothing is connected to it, and unfortunately a script (in your CHOP Execute DAT) doesnt force it to recook when inspecting the value.
There are a few ways to fix this, these 2 examples can be found in the attached .toe file.

  1. You could merge the Count CHOP into the Null CHOP your CHOP Execute DAT is monitoring, and then scope the CHOP Execute DAT to only look at the kick channel for triggering. Since the Count CHOP data is no longer orphaned at the end of a chain, it will cook along with the other data in the Null CHOP and stay in sync.
  2. You can add a Null CHOP after the Count CHOP and set its cooking to ‘Always’. This is the most simple to setup, but you are forcing it always cook every frame, so this option should be used considerately in more complex networks as you could cause a lot of unneeded cooking and a potential drop in performance (it is fine in this simple case).

Circles.1.toe (7.1 KB)

1 Like

Thank you so much!