running nonrepeating number series

mharter's icon

I love [urn], but it has to be restarted when it runs out of numbers, and there is always a chance that you'll get 2 of the same number in a row after clearing it. I made a little patch that generates a running series instead. The range can be changed on the fly.

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

MH

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

also check out the abstraction urn-jb. It's in the Cycling74 examples.

mharter's icon

Thanks!

I looked at that one a while ago and forgot about it. It makes sense to just throw out a double when [urn] rolls over instead of reinventing the whole concept of it.

I am always amazed at what can be done with [zl] though. I think it is one of the most useful objects in Max.

MH

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

Another solution:

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

grab always sounds like a hack, this is another one:

mharter's icon

I still have trouble grasping the grab object. stefantiedje, It never occurred to me to cross the outputs of a trigger object, then compare. I have often used a message box as a buffer instead. Your solution is more compact and elegant.

MH