Collatz procedure recursivity problem
Hi,
I want to reproduce in Max/MSP a recursive patch I use in Openmusic. The idea is that if a number is even then divide it by 2 and if the number is odd multiply it by 3 then add 1. the result (output) should be sent back to the input of the patch to have an infinite loop of 4, 2, 1. Does anyone know how to send the output to the input without having a stackover flow? I have tried the "set$i1" message but it doesn't seem to work.
Max Patch
Copy patch and select New From Clipboard in Max.
Here is the patch:
Max Patch
Copy patch and select New From Clipboard in Max.
Not sure how you want the timing to work but here's one approach.
Thanks alot ! Someone gave me another solution on the facebook page. I'll figure out what I can do with both of them.
pipe... tresh... grab...
I made this a while ago. I hope it helps:
Max Patch
Copy patch and select New From Clipboard in Max.