Thank you @scztt for your reply,
Indeed, I suspected that there was no out-of-the-box method for doing this but that it was necessary to go through an intermediate step (through a synth).
However, it would have been difficult for me to recreate the internal procedural structure of the synth with as much synthesis and elegance.
Thank you very much.
Below, just to have it handy for future reference, I leave the test code I prepared to pardon this mode that I was not familiar with.
s.boot;
// 1. create a 4 channels audio bus starting at index 10 (arbitrary)
a = Bus.new(\audio, 10, 4, s);
// 2. define the "aggregate bus" synth in charge of making the routing of the incoming audio signals
// This synth is using the "in.kr" method (see below for the "map" method);
(
SynthDef(\aggregateBuses, {
var stereoIn = In.ar(\in.kr([9999, 9999]));
[\out.kr([9999, 9999]), stereoIn].flop.do(Out.ar(*_));
}).add;
)
// 3. and instantiate it
x = Synth(\aggregateBuses);
// 4. now play some audio through the 4-channels bus
({
Out.ar(a, [
SinOsc.ar(100),
LFPulse.ar(100).range(-1.0, 1.0),
WhiteNoise.ar(),
LFSaw.ar(100)
]);
}.play;
)
// 5. take a look at the 4-channel bus
a.scope;
// 6. inject channels 0 and 2 from the 4-channel bus to the stereo input of the "aggregate bus" synth
x.set(\in, [0, 2].collect(a.subBus(_)));
// 7. make the "aggregate bus" synth output to the first audio outputs of the audio interface
x.set(\out, [0,1]);
// 8. check the server audio output
s.scope;
// 9. you can change the sub-buses to inject inside the "aggregate bus" synth
// and correctly see the output from the synth
x.set(\in, [0,0].collect(a.subBus(_)));
x.set(\in, [2,1].collect(a.subBus(_)));
x.set(\in, [3,2].collect(a.subBus(_)));
And below the “map” method:
s.boot;
// 1. create a 4 channels audio bus starting at index 10 (arbitrary)
a = Bus.new(\audio, 10, 4, s); // bus channels: [0,1,2,3,4,5,6,7,8]
// 2. define the "aggregate bus" synth
// in charge of making the routing of the incoming audio signals
(
SynthDef(\aggregateBuses, {
var stereoIn = \mapIn.ar([0, 0]);
[\out.kr([9999, 9999]), stereoIn].flop.do(Out.ar(*_));
}).add;
)
// 3. and instantiate it
x = Synth(\aggregateBuses);
// 4. now play some audio through the 4-channels bus
({
Out.ar(a, [
SinOsc.ar(100),
LFPulse.ar(100).range(-1.0, 1.0),
WhiteNoise.ar(),
LFSaw.ar(100)
]);
}.play;
)
// 5. take a look at the 4-channel bus
a.scope;
// 6. inject channels 0 and 2 from the 4-channel bus to the stereo input of the "aggregate bus" synth
x.set(\mapIn, [0, 2].collect(a.subBus(_)).collect(_.asMap))
// 7. make the "aggregate bus" synth output to the first audio outputs of the audio interface
x.set(\out, [0,1]);
// 8. check the server audio output
s.scope;
// 9. you can change the sub-buses to inject inside the "aggregate bus" synth
// and correctly see the output from the synth
x.set(\mapIn, [0,0].collect(a.subBus(_)).collect(_.asMap));
x.set(\mapIn, [2,1].collect(a.subBus(_)).collect(_.asMap));
x.set(\mapIn, [3,2].collect(a.subBus(_)).collect(_.asMap));