Control Buses

Just like .kr is control rate and .ar audio rate, there are Control Buses as well as the Audio Buses.

a=,1) //makes a 1-channel (mono) virtual audio bus

c= Bus.control(s,1) //makes a 1-channel (mono) virtual control bus

a.index //index of this bus

c.index //and of the control bus

When you set a value you are setting the current value held by the bus. You can also write to and from any bus using In and Out:

c.set(9); //set current value to 9

If in a SynthDef I used,  //Any other .kr UGen other than SinOsc could go here

I would be writing at control rate to the control bus over time, and might read it somewhere else:, 1) //read 1 channel from this control bus location

This is a standard method of inter-Node communication- different Synths can read or write to the same bus. 

Any argument of a Synth can be mapped to by control buses:


SynthDef(\mapexample,{arg freq=440;,,0,0.1))



g= Synth(\mapexample);

c.set(660);\freq, c.index)


h= {,,0,100,1000))}.play;;

g.set(\freq, 550)

Here is an additional example involving PlayBuf


//this loads into a buffer the default sound that comes with SuperCollider

//.read brings in the whole sound at once

b =,Platform.resourceDir +/+"sounds/a11wlk01.wav");

SynthDef("playbuf",{ arg out=0,bufnum=0, rate=1, trigger=1, startPos=0, loop=1;,,bufnum,*rate, trigger,*startPos, loop),0.0)




//make a new control Synth, playing on control buses



//control for retrigger (impulse with modulated rate),, 5, 6)));

//control for jump position in sample (any random frame),,0.5,0.5));



a=Synth(\playbuf, [\out, 0, \bufnum, b.bufnum, \rate, 1, \trigger, "c0", \startPos, "c1"]);

//showing unmapping of control signals- unmap the modulation of jump position when retriggered, it will now be fixed


//set fixed chosen start frame