s.boot;

SynthDef("sine", { arg freq=900;Out.ar(0,SinOsc.ar(freq,0,0.1)) }).load(s);

a = Synth("sine", [\freq, rrand(600, 300)]);
a.free;

g = Group(s);
a = Synth("sine", [\freq, rrand(600, 300)], g);

a = Synth("sine", [\freq, rrand(600, 300)], a, \addReplace);
a.free;

z = Group(g, \addReplace);
a = Synth("sine", [\freq, rrand(600, 300)], z);

k = Group.replace(z);
a = Synth.head(k, "sine", [\freq, rrand(600, 300)]);

a.free;

////////////messages

a = Synth.prNew("sine",s);
a.newMsg;
a.newMsg(k, \addAfter);
a.getMsg("/n_run", 1);

l = List.new;
a = Synth.newToBundle(l, "sine");
a.msgToBundle(l, "/n_run", 1);
a.msgToBundle(l, "/n_set", [\freq, 700, \gg, 900])
s.listSendBundle(nil, l);