Making a 0 to 100 CHOP value only goes up in increments of 1

Any other ideas are welcome to, but I only started TD last week so please try suggesting the most basic OPs, I only know TOPs and CHOPs.

So i have this knob that i can turn, clockwise will make it go from 0 to 1 in small increments, and after reaching 1, turning it clock wise will no longer do anything, c-clockwise will make it back to 0, the output is simply a CHOP with a 0 to 1 value. i want to make it so that no matter clockwise or counter clockwise i turn it, it will all add to a value, FOR EXAMPLE: I turn it until the output reaches 0.5, and turn it back to 0, and i will get 1 in the final counter

after some operations, heres what i have, two full turns brings a value from 0 to 100, and two full turn backward brings it back to 0, i also used another mathCHOP so that as the previous one go from 100 to 0, it goes from 0 to 100 (using range)

Here’s the reason for the title, my dumb way of doing this is that i will reference a chop that increases in intergers with my two 0 to 100 chops, and it will be referenced to the threshold of the two countCHOP linked to them. So as the value is between 0-1,the countCHOP threshold will be 1, and between 1-2 the threshold will be 2, all till it hit 100, and as it goes down the threshold also goes down.

It may help to provide a bigger picture of what you’re trying to accomplish (is this a MIDI knob? what are you trying to control after all these CHOPs?) since it might be that you’re missing a simpler, higher-level functionality that would negate the need for all of this complexity.

Regardless, you might just want to forgo CHOPs and use a CHOP Execute DAT that will do what you want with a simple python script whenever the value changes.

1 Like