Random list

Wil's icon

Hi,
I want to take a list and generate a random ordering into a message box, or comment? The list would look something like A A# B C C# D E F G# D D# A G. Each new iteration into a coll or dict would be great but not necessary.

Source Audio's icon

zl scramble will output scrambled list out eacht time input list gets triggered.

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

scramble:

Wil's icon

thanks for the quick reply. Perfect!

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

fill a coll with scambled list

Wil's icon

i like filling the coll. can the list end up horizontal i.e. so that no 1 is the new order, then no 2 is a different iteration . i am adding one from the previous list to the new list so it grows. But each iteration is a different combination from 12 choose 8. So there are actually 2 processes happening, (or 3). 1. >> 12 choose 8. 2. >> reordering of the set. 3. >> Adding one more than previous from each set before reordering. I doubt that there will be a singe patch that accomplish all 3 at once, so i am manually doing no 2.

A > A
A A# > A# A
A A# B > B A# A
A A# B C > A# B A C
A A# B C C# > C A# B A C#
A A# B C C# D > D C# A B C A#
A A# B C C# D D# > A# C# D D# A B C
A A# B C C# D D# E > C# D# B C A# D A E
A A# B C C# D D# F C# > A D C# C# F A# D# C B
A A# B C C# D D# F# A D > A C# A A# D C D F# D B
A A# B C C# D D# G A C# A > G D# A A B D A# C# C# C A
A A# B C C# D D# G# G D# A A > G# D D# A G C A C# A# D# A B
A A# B C C# D E F G# D D# A G > D# F A C D D G# G B A A# C# E
A A# B C C# D E F# D# F A C D D > C A D E F# D A D A# C B D# C# F
A A# B C C# D E G C A D E F# D A > D C B A E D C# G A# D A F# E A C
A A# B C C# D E G# D C B A E D C# G > A# B E D C C# C# C D G A A G# B D E
A A# B C C# D F F# A# B E D C C# C# C D > C# D A# C# F B B C# C C C D D F# E A A#
A A# B C C# D F G C# D A# C# F B B C# C C > C# B D F C# C# C A# C D A C F G B A# C# B
A A# B C C# D F G# C# B D F C# C# C A# C D A > B B F C# D G# C# A# A# C C C# C D A F C# A D
A A# B C C# D F# G B B F C# D G# C# A# A# C C C# > A G# C# F# B A# F G C# C D A# C C# C D A# B B C#
A A# B C C# D F# G# A G# C# F# B A# F G C# C D A# C > G# D A# A C# C# B G F C D G# F# C# B C F# C A A# A# 21
A A# B C C# D G G# G# D A# A C# C# B G F C D G# F# C# > A# D C C G# B A# C# C# B G F# A G# C# D C# A D F G# G

Source Audio's icon

This is a bit compliacated for me to understand, maybe because I just had a dinner followed with few glasses of red wine,
but You could have explained it a bit simplier.
Do You mean by "12 choose 8" selecting of 8 out of 12 items list randomly and making a list out of it ?
And as next step add 1 random item to allready created list, putting it to next position in coll?
Or anything else, but in expkained in understandable language ?

I am sure something can be done to simplify the whole procedure ...

Wil's icon

I'm a few glasses of vodka/grapefruit in as well!! But yeah, basically 12 choose 8 (from a chromatic scale) produces an ordered list of around 160 combinations. Then, take the first 8 and randomize the order. Next, randomly choose 1 from the newly ordered list and add it to the next combination = 9. Then randomly order the 9, choose 2 from that list and add it to the next combination =10, and so on. No real easy way to explain. Cause each of the 160 combinations are different resulting in different 'new combinations' as the list grows.

The scramble works great that Floating Point sent and I already generated all the possible combinations of 12 choose 8. So for now I am doing the additive part manually and putting it into scramble patch. Tedious and time consuming!

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

This is something that might ad an idea.
Not the full solution, as I am not in full control over my brains,
but have a look at zl len and adding list to coll.

Wil's icon

cool! i like it. a bit ifferent than what i was working on but i am open minded.

Source Audio's icon

Yes, for what You wanted, list manipulation stuff is esential.
There are zl objects, but also Lobjects by Peter Elsea, very helpfull stuff.
It is worth checking them all.

Wil's icon

thanks. great info and examples. i'll look into the Elsea stuff.