[PD] Fwd: random routing of 8 audio-streams to 8 outputs
danomatika at gmail.com
Thu Oct 7 21:57:28 CEST 2021
I do this using throw~ and catch~ where the mapping happens in an abstraction within a clone object. I've used this heavily for spatialized projects at work up for up to 64 channels.
Here is a simple solution using Han's c_urn suggestion to do the random number generation:
This could be further cleaned by using an output abstraction that wraps a [dac~] without creation args so you can set the output channel. You could also integrate the [dac~] into the existing channel map abstraction too, but I figured it was easier to read using a single doc~ object as an example.
if you want further heavy usage of this approach with multiple mapping layers, see https://github.com/zkmkarlsruhe/ZirkoniumSpatializationServer <https://github.com/zkmkarlsruhe/ZirkoniumSpatializationServer>
> On Oct 5, 2021, at 4:12 AM, pd-list-request at lists.iem.at wrote:
> Message: 1
> Date: Tue, 5 Oct 2021 00:08:22 +0200
> From: Simon Iten <itensimon at gmail.com <mailto:itensimon at gmail.com>>
> To: Pd-list <pd-list at lists.iem.at <mailto:pd-list at lists.iem.at>>
> Subject: [PD] Fwd: random routing of 8 audio-streams to 8 outputs
> <CAP9NQknMyn6OJSfP9UjBCf-ZNykr5QRP6qnbxA60pOcBLSUoLQ at mail.gmail.com <mailto:CAP9NQknMyn6OJSfP9UjBCf-ZNykr5QRP6qnbxA60pOcBLSUoLQ at mail.gmail.com>>
> Content-Type: text/plain; charset="utf-8"
> is there a somewhat elegant way to route 8 audio outputs (from readsf~) to
> 8 dac~ outputs randomly (on a bang for example)?
> i.e. out1 to dac4, out2 to dac7 etc.
> each output is allowed to one dac~ channel only.
> mathematically speaking that would be 8! 8x7x6x5x4x3x2x1 (40320)
> possibilites, but i don?t see an easy way to program this in puredata.
> some way of dynamic patching maybe? or a throw~ and catch~ approach? i get
> stuck on the random logic, since every ?step? that chooses a destinations
> changes the subsequent outputs that are still allowed to be chosen.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pd-list