stepwise adding/subtracting numbers

Apr 15, 2011 at 5:27pm

stepwise adding/subtracting numbers

Hi!

I would like to create an math app so that you stepwise add/subtract a number in two numberboxes with two different initial numbers.

like in patch below (which not working, just for explaining)

– Pasted Max Patch, click to expand. –
#56356
Apr 15, 2011 at 5:44pm

I’m not exactly sure what you’re asking, but the [accum] object is pretty flexible for this sort of thing.

#202154
Apr 15, 2011 at 6:01pm

ok.

For example:

Say I got two numbers in two different number boxes, say:

[> 10] [> 20].

Then I want to increase or decrease these stepwise so like [+ 1] both increase 1 and [- 1] both decrease 1.

understand?

#202155
Apr 15, 2011 at 6:03pm

Yeah. Chris is right. The accum object will be your friend.

#202156
Apr 15, 2011 at 6:58pm

In another thread, I was accused of some sort of disloyalty to the IncDec object (which I wrote.) Here’s a very IncDec-centric solution to your problem:

– Pasted Max Patch, click to expand. –
#202157
Apr 16, 2011 at 6:12pm

send the current state, -1, and 1 to [accum].

or use [110.indec].

#202158
Apr 16, 2011 at 6:17pm

   

Attachments:
  1. 110incdec.zip
#202159

You must be logged in to reply to this topic.