I needed to make a patch that spits out the numbers 1 through 12 without repeats. I'm sure there is a more elegant way of doing it but since I didn't find a pre-fab one online, I made this and am posting for others. Doesn't make a matrix, just spits out 1 through 12 in random order once. I attempted to make a reset button but it became too time consuming to solve, so this patch only works as a one-off. If you need multiple 12 tone rows using this, you'd have to refresh. 12-tone-row.pd
-
12 Tone Row generator
-
Thanks for posting - this is certainly a nice little challenge to work on! I approached this some time ago by removing random parts of a list until it's empty. Now that you posted here, I thought that the [text] objects might even make it a bit easier. So here's another approach (maybe a little overkill to use these objects ... but it works - reset is done after each generated row and you can change the range on the right): shuffle-text.pd
-
... here's another approach expecting a list input: shuffle-list.pd
I guess the loop management (stopping when all values are handled) could be done better - but I'll leave it like this for now.
-
[list store] makes this sort of thing easy.
l-shuf.pd
-
@oid oh, nice! and much better than my approach. wasn't aware that there was a delete method. thanks!
-
@ben.wes We got some new methods in 0.52 like delete, insert, and set. [list store] has gotten very useful since and we can now do things like build a list of the output at the same time.
-
How is this one? You bang the button and get a new tone row every time.
-
[scramble] btw comes from the ELSE library, not a built-in object.
hjh
-
@ddw_music Oh that's right, thank you @ddw_music for pointing that out.
There are a lot of good objects for manipulating lists in ELSE. You can probably easily make a row retrograde, inverted or retrograde inverted with ELSE objects, which i think would be some cool variations to have