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 ?
have a look to [zl lookup]
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?
----------begin_max5_patcher---------- 425.3ocwU1raCBCCG+L7TDkyLDI.EX21qvtNUMEfr1rAIHHn00p9tOH.qesJ fNJ6BnXGr+mew1rSWCFJ1PKffGAu.zz1oqooLUaPqcsFLkrIJgTn1FLkVTPV QgFM9dSvkbRJU46obFIoyCuLkwSnR0mgaMlQjQqY7UulSijMoE4aYZY.vdt0 ubUKP9lVfkGBjnT1EITqUVrJkhv2eH3XwTv1pDCBWEnFyMes7qLZSFgPvxZO 600qeXLvSNm9YU15xkjtQc.faS.IBwGkYSHRZXA1VAC+.0BqqhD7kHwazHwX hwhDDBpHyHgBpWn3OLlXeISVLVlDR3qTbw3NTxP4SW8BF0z0fUDx9FpWb92q WxI7XQ5j2Cg7Tnw0oGl7KiUrGKSXb4sgjylo9CSb.t.Ky..NvzAP.OWcLlb. 4zT5frG+bW7eatqJQvDF+7e.oDas8SQVgnLOpKTsMzfCxMlVHYbhjI3GsG6S 1yZVbLU4tSior3LQ0EWqDtx02XTDpGE4L6JB2ih7NQ02aEgGvs1hYkQdCPQA yJirGfh7lUF4LvdsakQUK1q+MbPJmoJ -----------end_max5_patcher-----------
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 :
|doubi73 wrote on Thu, 10 September 2009 16:25|
|I 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.
----------begin_max5_patcher---------- 472.3ocyVF0aBBCDG+Y3Swk9LyPKff6s84XwrTfNsKPw.0LmF+tOZAl5FNpS CyWJo20d8+86tlxNaKTbwFVEBdDdFrr1YaYoMoLX0N2BkS2jjQqzKCkyppnK XHmFeR1Fo1temkUTYxRtXwKkrDYSjIX7DWGvyap5STfZDGMwEl2tGdpNFEwu 8vrt37ZgPVw2xTdp2evr.bTXqOw5btHiI0RhbvXwZYmUbmbJYULgjJ4Ehikj 6zijja6vWBRc3BZt9vQOUxoYcxp4Hjerh0DHDBlq7r21VM3bkXDCDvC7g.XJ DBQCCUL1aXnFMRP8DIM9PUvduNa+ASkPFjY.ICB0sDjIAN08G8SxvdIIodi8 .QbuPj7GvgyMFIayfb4xgYBIJR8wWWPOGS7uDlPtaYhDhA9ugjfFjPHC2l38 uzlDSEKTXgKj2TxTREoE4FfFe8Mn1ImAMjquaAe4n4Vij5KPYLwvHAOq4clY +FRv2IWfzZCkwEe+WBz4mx9ofppXcYRW3ZemANjgorJIWnej3n0DdxZVxSSY Z2cIaNOcUQc4pUBmonYph7MPQ0+xAfGMEEZfh7GUFEdR92uhviphHFxnwqp4 Y.iHithbMPQiWUCafh7tBEUOYu8mRgA42. -----------end_max5_patcher-----------
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.
----------begin_max5_patcher---------- 352.3ocyTEsaBCBE8Y5WwM7bWCvZq1819E1qKlErkorzBlBl4z3+9DnUmFio aSW1KPtm6ENGNvkMQH7T8JgACO.OCHzlHDxC4.PcwHbCeUYM23KC2HLF9LAN NjSsrQppEVeR1AP8RaOJsCcA2VNWpl8RqnzFnjNljPhAZVtaJKDLNg.S5Vir xSpd5a2UzS4qZkUwaD9LO1J408YBjZ+XgHr8X79MxsHibsOAkkPbnaihbCwC 7jqDuuSG8bYEq7GB75ZPYmCzugivtfiLJyaBTpaJsvMxHm2QF8Sbj3+LWwT1 xalVKtpFS3AyH5k7k7+C9xI8I6MlTHCHIE.qHIE3vSPV5UpWJXPoglH58WpW hcq5k70fqkpS+TwKXG9wVlQursrmgt2zvAIWILVohakZ0WpY2OA.ceMykUUB eZRGRirZgVprcR.lb1qugpn7AnniU8sVQrAnn7egh1ErM5S.rlHYKB -----------end_max5_patcher-----------
WOW …less is more !
I will use your way !
|Peter Castine wrote on Thu, 10 September 2009 10:38|
|People 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…
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!