(
SynthDef("help-busGating", 
	{ arg freq=700, out=0;
		Out.ar(out, 
			SinOsc.ar(freq, 0, 0.1)
		)
	}).load(s);
)

a = Bus.control(s,2);
s.notify(true);

c = Synth("help-busGating", [\out, 1]);
d = Synth("help-busGating", [\out, 0]);

c.map(\freq, a.index);
d.map(\freq, a.index+1);

a.value = 300;

a.gate(1000, 0.1);
a.gate(400, 0.1);
a.line(rrand(800.0,300), 2);

(
SynthDef("help-busGating", 
	{ arg freq=700, out=0, in=0;
		Out.ar(out, 
			SinOsc.ar(In.ar(in), 0, 0.1)
		)
	}).load(s);
)

a = Bus.audio(s,2);
s.notify(true);

c = Synth("help-busGating", [\out, 1, \in, a.index]);
d = Synth("help-busGating", [\out, 0, \in, a.index+1]);

a.gate(1000, 0.1);
a.gate(400, 0.1);
a.line(rrand(800.0,300), 2);
a.xline(rrand(800.0,300), 2);