Trigger Threshold rounds up inappropriately, copy paste gets different value

Copy of the bug available here
CountTrigger.toe (28.5 KB)

Video explaining all three bugs available here

The following post reports three bugs in one post as one (I’ll call it bug “A”) is needed in order to replicate the other one (bug “A-1”) and the third one is more for convience of not creating another post (bug “B”).

Steps to recreate Bug A:

Create an lfoCHOP and change its values accordingly:

  • Type: Ramp
  • Frequency: 0.25

Create a countCHOP and connect it to the previous lfoCHOP and change its values accordingly:

  • Toggle “Trigger Threshold” parameter modes
  • set Trigger Threshold value to: 0.9999999

Create a evalDAT and under the Expression parameter copy the following:

op('count1').par.threshup

Displayed value should be “0.9999999”

Click back on countCHOP

countCHOP Trigger Threshold displayed value is now rounded up to “1” but hovering with the mouse on the parameter name will show again the “0.9999999” value.

Steps to recreate Bug A-1:

Copy (Ctrl+C) count1 and paste it (Ctrl+V) below

Displayed value should be “1”

Despite being a copy of count1, count2 will behave differently.

Create a second evalDAT and paste the expression:

op('count1').par.threshup

Displayed value should be “1.0”

Steps to recreate Bug “B”:

Create an lfoCHOP and change its values accordingly:

  • Type: Ramp
  • Frequency: 0.25

Create a countCHOP and connect it to the previous lfoCHOP and change its values accordingly:

  • Toggle “Trigger Threshold” parameter modes
  • set Trigger Threshold value to: 0.00415

Now countCHOP is now no longer able to detect any changes

Possible fixes for Bug A:

Set a specific value after which rounding happens automatically both on Display and Internal value

Possible fixes for Bug A-1:

Strictly copy the value from the internal value of the operator that is being copied.

Additional information:

Software: TouchDesigner version 2022.25370

O.S.: Microsoft Windows 10 Pro version 10.0.19045 Build 19045

Hardware:

CPU: AMD Ryzen 7 5800X 8-Core Processor

RAM: 16 Gb (2x8GB) Crucial Ballistix 3200 MHz RGB

GPU: NVidia GeForce RTX 3070 Ti ZOTAC Gaming AMP Holo

Hey @Papacci20

Thanks for the report.

Thanks as well for the detailed explanation and video.

It seems that there is a rounding bug with the parameter display / actual stored value / eval.

I’ll log this for a developer to confirm and look into it.

Note that you mention in the video something going on with the number of 9s you use, it probably just has to do with the data type used to store the value. But a developer can confirm this one as well: Difference between float and double in C/C++ - GeeksforGeeks

The LFO not hitting the value closer to 0 that you have set likely has to do with time slicing and the increment per frame… maybe add some precision issues into the mix and that could make things confusing.

Regarding your main challenge to solve, did you find a solution ? Did you try to work with the logic CHOP, and set the parameters to “Off when outside bounds”, “Falling edge” and bounds set to 1-1. Add a trail CHOP after the logic. Whenever your lfo “loops”, it should pulse. You could then use this pulse to build your stairs, if I understood what you are after correctly.

Best,
Michel

1 Like

Hi @JetXS and thanks for your answer.

I hope that the devs will also appreciate the explanation/video.

I agree with you on what could be the underlying issues causing them (variable types, time slicing, increment per frame, etc…) and I hope they can find a solution for it in the near future.

May I ask you to @ me if the devs where to update you on future fixes of these bugs so I can take the video down?

Also while your solution to the situation I was trying to achieve didn’t work out for me (a.k.a. I probably didn’t explain myself correctly) it did gave me an idea that allowed me to achieve it anyway so I still owe you one.

Best of luck,
Ruben

1 Like