do things only when number / value is changing more than x
hi.
last question :)
i have a values / numbers that change every 200 ms. if the number reaches a specific value something happens.
but i want to start that "happening" only if the number changes more than 3. how could i do this?
for the moment i try to reach this status when nothing is happening by two if-statements (if number is higher then do that, if number is lower then do that). but it is not very elegant for what i am really looking for.
i need a way to compare the last signal with the current signal and if the number is higher than 3 then start my function.
help would be great!
Hi
this is what I would do; but you don't specify exactly what the range of incoming numbers is, so the example below uses [random] for that part:
Brendan
Hi Brendan!
thank you for this helpful response.
i attached an image… this is my current solution.
your example is great! i will use this instead… but do you have an idea how i can get the values to "makenote" after this "filter of changing more than 3". it is hard to explain… i have to connect the values after checking if the value has changed more than 3… you know what i mean? i don't have a clue.
can i save it in a variable?
You can use the [> 3] to gate the values.
perfect. thank you.
also, the [lbyl] external could be interesting for you:
http://cnmat.berkeley.edu/patch/4067