I have a Synth generated with a do:
(
SynthDef(\siny, { arg freq, outBus=0; Out.ar( outBus, SinOsc.ar(freq!2,0,0.2) ) } ).send(s);
SynthDef(\filter, { arg cFreq,q=0.8, inBus; Out.ar( 0, BPF.ar(In.ar(inBus), cFreq!2, 1/q ) ) } ).send(s);
)
(
~sourceOut = Bus.audio(s);
~sine_Group = ParGroup.new;
z = [100,500,1000,1500,250];
{
z.do({ arg val; Synth.head(~sine_Group, \siny, [\freq: val, \outBus: ~sourceOut]) });
z.do({ arg val; Synth.after(~sine_Group, \filter, [\inBus: ~sourceOut, \cFreq: 200] ) });
}.play;
)
Right now, my understanding is that, output of multiple instances of Synth \siny get mixed in the bus ~sourceOut, and goes as an input into synth \filter
What i actually want to do is to have a one-to-one connection between the multiple instances of \siny and \filter.. Could I use an array of busses to connect them? If so, how do I do that?