increase and decrease a number with one

Kaspar's icon

Hi,

Max Patch
Copy patch and select New From Clipboard in Max.

I would like to increase and decrease a number with one by clicking an "increase" and a "decrease" button.
In order to avoid stack overflow, then I need to do some magic ... can anyone help me with this?
Perhaps the below patch is a good start, but I don't seem to be able to figure it out ...

Thanks for your help!

K.

Jan M's icon

Many solutions. I.e this:

Max Patch
Copy patch and select New From Clipboard in Max.

`

also you might take a look at [counter]

Kaspar's icon

How nice! ... sometimes life is more simple than you would think :-)

Tim Lloyd's icon

There is also the [incdec] object.

FRid's icon
Max Patch
Copy patch and select New From Clipboard in Max.

What's wrong with [incdec]?

Jan M's icon

Nothing wrong about [incdec] !!! I think he is a very pleasant fellow ;)