Mix words in a coll list like a deck of cards?
Hello!
I would like to mix a database of words (in a coll list) continuously, as if it were a deck of cards.
I tried to work with messages (sort, renumber, swap, merge) to the object "coll" but they don't provide what I need.
I want to change the words's indexes, not just the order. And I must control the "speed" of the process. Does someone have some suggestions?
I paste the patch I used to create the coll list from a list of words.
Thank you very much!
Depending on your usage, it might be more sensible to leave the coll alone, and use random numbers to select items from it.
Thank you Kyle, your patch works good but if I use a longer list there is a limit of 128 items...do you know how to get over the limit?
I would like also to have more control of the process, not just mix the entire list at once. It would be great to decide how many items mix or mix two elements at once and set the speed.
Maybe Christopher you are right, it's better to leave the coll alone and work selecting items from outside, but I don't understand how to use your patch to do what I need!
Thanks to both of you!
I don't know exactly what end result you're trying to achieve. But I gathered that you want to scramble the organization of (i.e., randomize the indexing of ) items in the coll so that you will get unpredictable results when you send index numbers into the coll. I was suggesting that you can get unpredictable results by just sending randomized numbers into the coll instead.
(By the way, there was a small bug—an incorrect patch cord connection—in the patch I posted above. I've fixed that now.)
I want to get unpredictable results even if I send the same index numbers, that's why I need to mix the words and the indexes together. Kyle's patch does it but all at once (and if the limit of 128 items), but I would like to control it with some speed parameters.
Thank you for the help!
Not to belabor the point, but...
To my mind there's no discernible difference in the result between a) scrambling the coll contents so that index numbers give random unpredictable results or b) triggering random index numbers (which could be triggered by the same source as the "index numbers" you're currently using) to look up unpredictable items.
playing with listfunnel. Hope it helps. Limit: test to know, a message box is 255, indexes in a coll, thousends, see zl help
zzz
Christopher, I hope I didn't misunderstand what you wrote :)
To my mind the difference is that if I just trigger random index numbers but I don't change the indexes inside the coll, everytime I trigger an index (even if it's random) it will give the same word, that is associated with that index. Instead I want to mix the words and indexes and than trigger random indexes...but in correspondence of the same position (or in the same index number) I will find everytime a different word.
This can be done with message "swap", but it works only with 2 indexes at once. I would like to swap also group of indexes.
GABRIEL9 i don't understand: if you randomise indexes and words, you can have duplicated words.
a thing to test:
the simplest thing: (i added to my answer)
Thank you MIZU, your patch is great...the last problem is that it mixes all words at once but working with [uzi] it will be resolved.
I did a mistake, because mixing just indexes (or just words as in your patch) it's enough to have different risults in the same index when it's triggered.
To be as clear as possibile: I wanted to swap groups of indexes (or words) to be able to control the amount of indexes in the groups and, of course, the speed of the mixing process.
I think your patch will take me to the solution, so thank you again!
depending of your needs: group words in lists in another coll, then scramble, etc. Uzi and coll can be very fast, use only one index is a bit "inelegant". My thinking is to not have repetitions. Have a nice patching time !
zzz