Hey there, I’m facing an issue, where parts of my application only work, if the corresponding path is opened AND the corresponding viewers are active.
This is how my app should work:
I’ve got some circles with 3 states: on, flashing, and off. When you click on a circle in the panel, it flashes until a clock gives a certain value. Then it changes to the third state (the principle is similar to a traffic light with ‘yellow’ being the flashing state).
This only works, when the network editor with the path /project1/balls/Kugel1 is opened and viewers are active.
When there is only the panel opened, or the viewers are off, the circles skip the flashing state and only switch between on and off.
have a few suggestions, but before I get to them - a quick note for others (and yourself):
The “Constrain Cursor” parameter on the project1 comp is a not so nice setting when giving it out to others to debug
thanks for the reply! I didn’t know about the Constrain Cursor feature, it actually saves me lots of time since I had to open the textport window to leave the panel before
I’ve realised that the .toe still contains a lot of unnecessary stuff. I’ve simplified the network to make debugging easier. This time without constraining
hehe - I was stuck there for a moment before figuring out what was going on Thank you for the simplified example as well.
The combination of the Switch with the two Count CHOPs seems to be preventing the Count CHOPs from counting and/or resetting - I’ll try to debug this further.
But for your purpose I would simplify the setup: Instead of a Constant CHOP ever increasing, use a Button COMP that can be triggered with a .click(). This can be fed into a Count CHOP that is clamped on a min / max at 0 and 1 and have as the third input a small increment value (like 0.5/me.time.rate)
On the Count CHOP itself, set “Off to On” and “While On” to Increase Count, and “On to Off” and “While Off” to Decrease Count. The result of the Count CHOP should be added to the Button’s value before being referenced in the Switch CHOP that controls the brightness.
You will also have to change your script that triggers the action to click the button op('something/button1').click()
Instead of using a Button COMP, you could also generally rethink the setup for every ball to be it’s own object with custom parameters that would store the states. So adding a Toggle Parameter to a Geo Component and moving most of the logic inside might simplify your approach and make it more easily reusable.
Hey Markus, thanks for your answer and explanations. I’ve rebuilt your code, but I think my goal was a little different. In your example, the outcoming value is on 1 by default, then changing to 0 or 2 and going back to 1 after a time. My approach was to ZigZag between 0, 1 and 2. So with each click, the value changes to 1, and then going to either 0 or 2 after a time.
Luckily I’ve found a (kinda weird) solution. Instead of using two count CHOPs (which seem to cause the problem according to your explanation), I’m just using one count CHOP but change it’s behavior with each click.
Now the output Value ZigZags between 0, 1 and 2 in dependence of a clock. (In my case it’s the timeline in Ableton).
I’d be curious about the mechanisms causing the initial problem.
Thanks again for your help!
Edit: In case you open up the solution.6.toe and the output value is 1 (yellow) just substract/add 1 to the counter. This happens because the count CHOP is triggered when opening the file
this other solution just came to mind where you would utilize a lookup which makes it so much nicer as you can control the duration easily with a Filter CHOP…
The way the lookup curve is created is a bit wonky but solid: A pulse CHOP is used that is fed to a Speed CHOP which has timeslicing turned off. An important part is that the extent conditions of the CHOP are set to “Left”: Hold and “Right”: Default Value (2).
WHen now controlling the lookup index via the filter, we will extend the range slightly so that the lookup will have to go slightly outside the normal range of the curve producing a 0 when off and a 2 when on while for the rest of the time, it’s 1…