how to make a random pick from list ?
- I have 6 switches (on-off)(toggles for the moment);
- With some "if" objects, the combination of each(6) switch state (on or off) should generate a list of int (1 to 9) ;
- I want to randomly pick a number from that (dynamic) list(or message... I don't know).
My questions :
- Witch object should i use to store that list ?
- Witch object(s) i need to pick an int from it ?
hi,
have a look to [zl lookup]
Ch
People used to use James McCartney's alea object to do this.
The object was orphaned years ago, but lp.ale is a living reincarnation. Give it a list and it will choose one item at random.
Lp.ale is part of Litter Power and included in the free Litter Starter Pack. This runs on Max 5 (despite the Max Window's complaints) but is happier on Max 4.
The version in Litter Pro will run on both Max 5 and Max 4.
I just installed Litter Power on MAC with max5. It does not work.
I just installed Little Power on PC with max4.6. Some objects are still available but there is no object lp.ale.
Do someone have an other solution ?
isn't it what you're looking for?
Thanx everybody. I found how.
There it is....
For the future...
I am really beginner and want to know :
What should I do when you send me TEXT MAX patcher like you did ?
have a look to that post :
ch.
doubi73 wrote on Thu, 10 September 2009 16:25I just installed Litter Power on MAC with max5. It does not work.
I just (re-)tested lp.ale 1.0 from Litter Power 1.7.1 (the current Starter Pack version) with Max 5.0.7. Works fine here (see screen shot--the .help file is also the Max 4 version, hence the wonky alignment after Max 5's conversion).
Thank you for pointing out that lp.ale was inadvertently not included in the Windows distribution of the Starter Pack. This will be updated shortly.
random and zl nth will do.
this is actually an interesting way to select a random list element. I would have done this, but you do it with few objects.
Did you have a look to what I posted?
quite the same
I tried but...i have difficulties to copy and paste a patch.
I don't know why.
I will ask a friend in montreal...to try with me.
tanx a lot
Just for the fun, you can also use the scramble mode of zl.
WOW ...less is more !
I will use your way !
Peter Castine wrote on Thu, 10 September 2009 10:38People used to use James McCartney's alea object to do this.
The object was orphaned years ago...
There was no alea object in James McCartney's orphaned collection according to my copies of it. (Which for sure reincarnated in Super Collider...)
But there is a (still alive) alea object in the RTC library, basically the same as the other suggestions as abstraction.
My favorite is the zl scramble though, unless you need DOD certified randomness...
Stefan
Thanks...finally i found this solution too....a zl scramble with a zl mth
Resurrecting this post but how would I go about reversing this process? I am looking to take a list such as '1 0 0 0 1 0 0 0 1 0 0 0 1 0 0 0' and 'mutate' it slightly by changing a specified number of 0's into 1's at random without changing the existing 1's. I've been going through the ZL help files but I can't join the dots on how to achieve this. Any help would be much appreciated and even more appreciated if this was achievable with no externals... Thanks in advance!
Can any one please tell me how to select random numbers without repetition.
urn.