Combining Nodes in SuperCollider
Creating and Connecting Nodes
Audio buses can be used to connect synth nodes. In this example we will create two nodes - one for generating a sound and one for processing it. First thing is an audio bus:
~aBus = Bus.audio(s,1);
The ~osc
node generates a sawtooth signal and the output is routed to the audio bus:
~osc = {arg out=1; Out.ar(out,Saw.ar())}.play; ~osc.set(\out,~aBus.index);
The second node is a simple filter. Its input is set to the index of the audio bus:
~lpf = {arg in=0; Out.ar(0, LPF.ar(In.ar(in),100))}.play; ~lpf.set(\in,~aBus.index);
Warning
Although everything is connected, there is no sound at this point. SuperCollider can only process such chains if the nodes are arranged in the right order. The filter node can be moved after the oscillator node: