I am trying to build a counter with two bangs: one for addition and one for subtraction. So when the addition bang is triggered, 1 gets added, and when the subtraction bang is triggered, 1 gets subtracted from the number before. What I have so far doesn't really work, because the counter doesn't update when the minus bang is triggered. I hope you understand my problem How can I wire the bottom number to the top number without creating a stack overflow?
-
counter adding and subtracting
-
I've been doing it like this lately, but i'm curious if there's a better way
-
@LarsXI This also seems to work:
-
@ingox For me this has always worked......
-
thanks all! Didn't no you could send operations in messages.
-
@pestopasta Yes, everything that passes down a "control" cord in Pd is a message, and knowing how to manipulate those messages is very powerful.
Here is some good bedtime reading.......
http://puredata.info/docs/manuals/pd/x2.htm
It gives a good understanding of what is going on "under the hood"..... but don't read chapter 2.9 yet or you will give up.....
David. -
@pestopasta [-1( is not an operation, it is a negative number...
-
@ingox yes you're right! makes more sense now