Random from list

Feb 15, 2010 at 9:08pm

Random from list

Hi All,

Does anyone know of an object for or method of randomly choosing from floats within a list?

Thanks
Jack

#48505
Feb 15, 2010 at 9:48pm

Have a look at ZL scramble

#174463
Feb 15, 2010 at 9:51pm

Or something like this?

– Pasted Max Patch, click to expand. –
#174464
Feb 15, 2010 at 10:29pm

Brilliant, Thank you.

Both are great approaches.

#174465
Feb 16, 2010 at 2:22am

@7nches – just curious, what’s the point of the [t l l] object joined to the list/message outlet? doesn’t the max order of execution output in the same order as the trigger, making it superfluous? is there something i’m missing?

#174466
Feb 16, 2010 at 3:14am

@tdaeik, you’re right, it’s totally useless in this case. I couldn’t tell you why I put it there if I wanted. I did this pretty fast, without thinking too much about optimization.

#174467
Feb 16, 2010 at 3:21am

cool. was just wondering,,

#174468
Feb 16, 2010 at 9:42am

I’d consider it good style. It improves readability, avoids errors when you go back to a patch and move things around, and takes next to 0 computing. Becomes more important when your patches get bigger though.

#174469

You must be logged in to reply to this topic.