Is it possible for to output to non-contiguous outputs

quickly and maybe offensively: Max and Pd [dac~] can take non-contiguous outputs, which is very convenient for reassigning them as part of delivery of a piece for various soundcards and setups. I might want to use move my usual [dac~ 1 2 3 4 5 6] to [dac~ 11 12 13 1 15 16] for instance. the 1 in the middle is not a typo.

I was thinking of making an array for my outs but then I’m stuck as it seems I can’t pass an array to the bus out. What would be the most elegant way to achieve what I am trying to do in SC?


You can do something like this:


SynthDef(\test, {|outs = #[0,1,2,3]|
	var testSig = * 0.1;
	outs.collect{|n|, testSig)}

Synth(\test); // watch the meter
Synth(\test, [\outs, [2, 4, 5, 7]]) // watch the meter

Thanks for this. It would probably not work for me as I am creating a sum of many files and processes in my performance code which I send to a 5.1 bus (L-R-C-x-Ls-Rs) and that bus is the thing I need to rejig.

Here is some code trying to do it around your idea. There might be a more efficient way but that works so thanks!


SynthDef(\test, {arg outs = #[0,1,2,3,4,5];
	var input =,mul: ((0..5) * -10).dbamp);
	outs.collect{|j, i|,input[i])};

x = Synth(\test); // watch the meter - the amplitude helps to see what is where;

// another order
x = Synth(\test, [\outs, [3,2,4,5,1,0]]) // watch the meter

You can do this:

SynthDef(\test, {|outs = #[0,1,2,3,4]|
var surroundMockUp = 5.collect{|i| * (i + 1)) * 1/(i+1) * 0.1};
5.collect{|i|[i], surroundMockUp[i]) }

Synth(\test); // standard
÷Synth(\test, [\outs, [3,5,1,7,6]]); // new configuration

Well, basically the same thing…

1 Like

You would probably want to use busses rather than doing everything inside the same SynthDef. I have not worked with surround sounds myself. You might wanna take a lot at the Ambisonic Toolkit. Here is solution with standard Ugens I think should work, kind of like a half-normal patch bay.

~surroundbus = 5.collect{, 1)}

SynthDef(\surroundSig, {|bus = #[0,1,2,3,4]|
	var surroundMockUp = 5.collect{|i| * (i + 1)) * 1/(i+1) * 0.1};
	5.collect{|i|[i], surroundMockUp[i])}

SynthDef(\out, {|in = #[0,1,2,3,4], routing = #[0,1,2,3,4]|
	routing.collect{|n, i|,[i]))};

x = Synth(\surroundSig, [\bus, ~surroundbus]);
y = Synth(\out, [\in, ~surroundbus], addAction: \addToTail);

y.set(\routing, [3,5,6,7,1]); // change routing
1 Like

My planned approach is similar but with a single 6chan bus and only a re-router like your 2nd synth at the end of the chain, with a master volume and master urgent mute button :slight_smile:

thanks for it all I think there is a lot to solutions in this thread.