I have a new closely related problem to solve: I’m looking for a way to route N inputs to N outputs, and on trigger, choose a random 2 in→out routings and switch them, leaving the others unchanged. On the next trigger, a new random pair of routings would switch, and so on.
Similarly to the first topic, a carousel module comes close, but I’d like the routings to be “mixed up” not sequential.
Can one of the modules in the previous topic be modified to do this? Is there something else?
It looks good and I thought of that construction first. I think it’s not what the OP is asking for, although I’m not realy sure what he wants. In your construction the pairs of inputs are fixed, but the OP wants them shuffled, I think:
choose a random 2 in→out routings and switch them, leaving the others unchanged. On the next trigger, a new random pair of routings would switch
But maybe I’m wrong and not understanding what he wants. So if he does want fixed pairs then your solution is good
n=16. I wanted to hurt my brain so I put way too much time into this, which I’ll probably never use. The only aspect OP might not like is the (kinda) null case, where it switches the same channel with itself, so no swapping. That would be easy to adjust on the random generation side.
This does sound like an interesting module to develop, if it doesn’t exist already among the 2848 modules already in the library. Sometimes I think creating a new module is faster than finding existing functionality, but that only makes the problem worse!
Oh, you forced me to make a patch storage account, ha ha!
Uh, if you want any hints to “understand” it…the one interesting programmatic thing that occurred to me is that – we have 2 random voltages selecting the 2 channels to swap. One way to swap the voltages is just to get the absolute value of A-B, add that to A, subtract it from B, and voila. (Even though I don’t use an absolute value function – that’s the job PMM is doing).
And I was sure docB’s new TXVI module would be useful. I’m finding a way to use that every day the past week. Cheers!
Oh, ha, that is certainly harder. Probably just a matter of adding another 18 modules to the right of what I banged together. Sounds simple enough, ‘capture the last state, then make the next change from there’. But it reminds me of the very complicated things I made a few months ago to make random-based arpeggios where a note would not be repeated twice in succession.
We all want random, but juuuust enough random.
One thing I can rule out is just patching the result values from the right side back into the IN of the TXVI module. It doesn’t work like that (similar to how docB’s Faders module doesn’t capture the mod input for storage).
I’ve put this thread on my Watch list because it may give me some hints about how to make a pattern like change ringing or method ringing of church bells. Unlike a carillon where the bells remain still and relatively light-weight clappers strike them in any arbitrary order, the bells used in change ringing are swinging back and forth, and their inertia restricts how soon they may be rung again, typically shifting by no more than one place in the sequence (if at all).
Each note swaps places with one of its neighbours, so it’s like a braid pattern.
Here’s another pattern with 6 bells, with two of the strands highlighted:
I have a feeling it’s going to end up being a complicated arrangement of A/B switches, shift registers, S&H, flip-flops, etc. — Oh, I may have an idea. Something to do with two shift registers, one that keeps track of notes “travelling” to the right, another for notes travelling to the left, and they somehow get “interleaved” — Nope. It’s gone now.