Store Values and Sum

Hey, I have a beginner question about using values, how can I store a value in VVVV Beta when the input becomes 0 again and when the input becomes greater than 0 again add this value to the stored value?

found this workaround, but does not work very well

Add.v4p (7.0 KB)

Something like this?
increment when positive.v4p (11.0 KB)

I will try to describe it better.
if, for example, a pressure sensor is pressed in a 1st interaction and it delivers a maximum value x1, this value should be saved. then there is a pause until the 2nd interaction. in the 2nd interaction, the pressure sensor is pressed again, the new value x2 should be added to the saved value x1 and the resulting value saved.

some questions:

what do you mean by added? sum(X1, X2, …, X(n-1)) or Xn+X(n-1)
What do you mean by saved? to a file or just while running the patch?
do you want to save all the values?
are you using the pressure sensor as a button?
what is it that you want to do? maybe an explanation of what it is you want to achieve will make it easier to understand

thank you already

I still don’t get it. the patch is still doing what I understand you want to do from what you have written so far.

Let me rephrase the question, do you want to count how many time the “botton” is pressed?

the behaviour of the sensor is not a button

I want know how hard someone presses, e.g. middle hard = 501
store this value in the patch
and when pressing a second time, e.g. slightly = 114, add this value to the first value.

you you almost want what it is doing, but you want to store the maximum value for each press and add those together?

When the pressure is below a threshold, you consider the press is considered done?

Like this?

SummationOfPresses.v4p (20.7 KB)

thank you, that helps me

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.