Automatic decreasing a value

Hello,

I will go straight into the subject. As you see in the attachment there is a LFO and toggle nodes to check the max and min. times.

what I want to do is, when one of the bangs actually bang
I want to substract 0.5 from 20 until it hits 0.
And when I reach 0 I want to set 20 again.

EDIT: ignore the helppatch geometry, it is totally different stuff. check the other one.

helppatch_geometry.v4p (25.1 kB)
patchhelp.v4p (6.8 kB)

i don’t see any toggle nodes here.

anyway it could be helpful for understanding if you would reduce that patch to the essential for understanding

Hello,

I will go straight into the subject. As you see in the attachment there is a LFO and toggle nodes to check the max and min. times.

what I want to do is, when one of the bangs actually bang
I want to substract 0.5 from 20 until it hits 0.
And when I reach 0 I want to set 20 again.

EDIT: ignore the helppatch geometry, it is totally different stuff. check the other one.

As I edited in a second, ignore the helppatch_geometry and look at pathhelp.v4p please (:
I couldnt find a way to remove the wrong attachment.

i like better the recursive method

patchhelp.v4p (10.6 kB)

Hello,

I will go straight into the subject. As you see in the attachment there is a LFO and toggle nodes to check the max and min. times.

what I want to do is, when one of the bangs actually bang
I want to substract 0.5 from 20 until it hits 0.
And when I reach 0 I want to set 20 again.

EDIT: ignore the helppatch geometry, it is totally different stuff. check the other one.

thanks.
The thing is It can be more elegant if I know about the counter node. This happens to me most of the time, I know there is a node exists to satisfy my needs but I just cant find it.
Again thank you !

Hello,

I will go straight into the subject. As you see in the attachment there is a LFO and toggle nodes to check the max and min. times.

what I want to do is, when one of the bangs actually bang
I want to substract 0.5 from 20 until it hits 0.
And when I reach 0 I want to set 20 again.

EDIT: ignore the helppatch geometry, it is totally different stuff. check the other one.

I am looking at the code but I couldnt realize how Map Node works.
Can anyone explain it a little briefly. I also looked at the help
patch but it is complicated too.

btw:
there is no need always to quote the original post; my mousewheel will thank you!

the Map (Value) (and also it’s equivalent MapRange (Value) ) is not that hard to understand. once you get the clue about the different modes you will notice that both nodes are very versatile.

i completely agree that the helppatch is close to useless

Yes, Save our Mouse Wheels!!!

Where do the Bangs come from you are talking about?

2 Nodes that might help you are: Framedifference (Animation), that can figure out if your value is going up or down, and the Counter (Animation) node, set that to Max 20 and increment (that is a difficult word for step size) to 0.5.


For Counter Experts:

Okay, if I set MAX to 20, why can I reach 20.5 if I use an increment of 0.5??

edit: Okay, a dirty bug in there…

patchhelp-3.v4p (13.0 kB)

wow

Counter with Increment 0.5

didn’t know that this works!!!

i remember to had some weird problems trying with increment 0.5 in an old beta

y prefer to divide the output of the counter

yeah, i agree,
forcing a pin that “asks” for integer to sth else anyway appears anyway a little suspect to me.

for this reason i never, ever had tried to do this myself…


@tolgainam:
did it help you?
please don’t be shy to ask more!
even if you ignore our “mouse-wheel-rantings” ;)