Computing numbers: Inc/Decrement/Wave Wrap Counter [newbie]

bennid's icon

Hi,
(sorry for my question i did'nt find in the forum)

Using counter i can change:
- min sending message "setmin $1" in first box input
- max using last box input called "set count max"

I tried using "carry" that bang when count hit max to increment (+1 ) the "set count max" but it doesn't start again and increments to infinite.

Any solution to get:
1 2 3/ 2 3 4/ 3 4 5/ 5 6 7 for example?

Here's the patch that failed...
Thanks a lot for any feedback :-)

Counter-incr-each-cycle-test.maxpat
Max Patch
Counter-incr-each-cycle-testforum.maxpat
Max Patch
Chris Muir's icon
Max Patch
Copy patch and select New From Clipboard in Max.
bennid's icon

Thanks a lot Chris,

I'd love to think that way,
hope it ll come with time.

it's kind of a backward way of using it to me ;-)

bennid's icon

Hi
I'm trying to change the count to down and up&down directions,
and also to restart it after a number but with "coherent" transition,
as for number around a circle. (with a view of spacialization )
for ex limit to 7:
123/234/345/456/567/671/712/123/...

Sorry for my Newbeing !
( I try as much as I can... )

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

Well,
still stuck I'm wondering why "carry count" doesn't continue while in down mode...

bennid's icon

Hi there,
so I tried with a sel but no success,
maybe the disposition from right to left that doesn't make the calculation in the right order?
Any hint?

Thanks a lot

Max Patch
Copy patch and select New From Clipboard in Max.
chapelier fou's icon
Max Patch
Copy patch and select New From Clipboard in Max.
charlie's icon

Weird, I can't get the carry count to work in downward mode either.

Here's a way to do it for each direction, avoiding zeros, using pong to wrap the values like you described:

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

Pong is weird in the downward direction too - it seems to take one "wrap" for it to output the correct range, which is why I stuck those range messages in there to be banged after the first wrap.

bennid's icon

Thanks Charlie but i don't see where the problem comes from ,
I 'm usually using isadora software that intergrates a wrap counter,
it's amazing how this is hard in max... just to make several series of number,
but i'm sure there should be a simpliest way of doing: ( in 4 ie )

- 1 2 3 2 3 4 3 4 1 4 1 2 1 2 3 ...
_ 1 4 3 4 3 2 3 2 1 2 1 4 1 4 3 ...
_ 1 2 3 4 3 2 1 2 3 4 1 4 3 2 3 4 1 2 1 4 3 ...

and being able to change min/ max and interval of counting,
I think I'm going to give up ;-ù

bennid's icon

any help?

bennid's icon

Please?

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

Here's a patch that produces the up and down with a variable maximum

bennid's icon

thanks a lot Rick,
i'll dig in it seems a clever solution !

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

Looks like I was a bit too clever, somethings not quite right. Here's another take on the patch.