Control buses route modulation signals between synths so one modulator can drive many
Control buses are SC’s routing layer for non-audio modulation signals. Bus.control(s, 1) allocates a control bus. Out.kr(busNum, signal) writes to it; In.kr(busNum) reads from it. The asMap method provides a shortcut: synth.set(\freq, ~myBus.asMap) directly maps a running synth’s argument to the bus without needing In.kr in the SynthDef. SC has 4096 control buses by default. Control buses are essential when a single modulator must drive multiple independent synths simultaneously.
Examples
~ctl = Bus.control(s, 1);
{Out.kr(~ctl, LFNoise0.kr(2).range(220,880))}.play;
{SinOsc.ar(In.kr(~ctl),0,0.1)}.play;
// Or with asMap:
x = Synth("mySine", [\freq, 440]);
x.set(\freq, ~ctl.asMap);
Assessment
Describe a scenario where a control bus is preferable to embedding a modulation UGen inline. Write a patch where a single LFO controls the frequency of two different SynthDef instances.