Change Integer to a list 1-i ... ( 1 2 3 4 5...)

Mike Fodor's icon

There has to be an easy way to do this, but I haven't found or figured out a way to do it yet.

In my patch I get to a number that I want. In this case, this number is 10. How can I turn the number "10" into a list of numbers 1-10, i.e. "1 2 3 4 5 6 7 8 9 10" ?

Nil Hartman's icon

I spent so much time myself a few years ago figuring that out. Here's a solution, hope it helps !

lists.maxpat
Max Patch

Mike Fodor's icon

Wow, Yes! That works. Thankyou very much Nil!

TFL's icon

A more modern (and efficient) way of doing this (starting from Max 9.0.0):

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

Mike Fodor's icon

Alright perfect. They work great. Thankyou!