triggering something in Vuo when a threshold is crossed in specific direction

Hello - I was wondering if someone could suggest a way in Vuo (or point to a sample comp or tutorial or documentation) for me to be able to take a numeric value that is changing (going up and down and up again etc.) over time and use that numeric value such that it can trigger something (perhaps toggling between 2 states, perhaps incrementing another numeric value) when a specified threshold is crossed but only when the threshold is crossed in a specific direction (for example only when the value crosses the threshold as it is increasing) Although it may not be necessary I just made this crude graphic to help illustrate what I mean…


The green curved line is the changing input value (left to right is time passing), black line is the threshold, green and reddish shading represent 2 states. See how it’s only toggling between the 2 states crossing the threshold on the way up ? What is a good way to get that behavior in Vuo ? Thanks for any info.

1 Like

Not sure I understand your question correctly but if I do, would the joined comp be something ?

 

Trigger Greater Than 1.1.vuo (1.4 KB)

1 Like

Thanks for the response. I was making it more complicated than it really is. Your comp offers a simple and effective way to do it. Thanks again, I appreciate it.

1 Like

If you want to make it more complicated though, you could use an enqueue node set to two items, get them, and compare them as the boolean operation. Then you would have a directional threshold ;)

1 Like

use an enqueue node set to two items, get them, and compare them

yeah, I had been kind of imagining something like that… maybe something like that would allow me to additionally determine how fast the number was rising (or falling) when it crossed the threshold and it might be fun to be able to make use of that info ?

Shouldn’t be too hard, I would imagine something like this would work; if (item1 - item2) < [item1 AND threshold], do something.