I’m often finding myself needing to send the output from a SynthDef to two or more separate buses on an as-needed basis - for example, for traditional Send FX busses, reverbs, etcetera, or when I want to record a bunch of specific individual instruments into separate files while also hearing them.
I know I can do this by defining an arrayed control in a SynthDef, like:
a = Bus.audio(s, 1);
b = Bus.audio(s, 1);
SynthDef(\test, {
Out.ar(\out.kr([0, 1]), SinOsc.ar * 0.1)
});
Synth(\test, [\out, [a, b]]);
This sends a sine wave to buses a
and b
. But (if I’m understanding the documentation correctly), this Synthdef must now always have two output busses. If I run this:
Synth(\test, [\out, [a]]);
Then the signal still plays through my speakers, since it’s still playing on Bus 1. So I can’t use this same SynthDef for both single-output and double-output. I could work with this, but I’d have to define a new SynthDef for every time I want to send the audio from that SynthDef to multiple locations (for two, three, four outputs).
I can think of a couple ways I could maybe handle this but they all seem very hacky. Is there something I’m missing?