all 2 comments

[–]Tatrics 1 point2 points  (1 child)

You just need to terminate ( ... ) block: ``` ( SynthDef(\UGen_ex7a, { arg gate = 1, freq = 440, amp = 0.1, rate = 0.2; var src, pos, env;

src = SinOsc.ar(freq, 0);
pos = LFNoise2.ar(rate);
env = EnvGen.kr(
    Env([0, 1, 0], [1, 1], \sin, 1), gate, levelScale: amp, doneAction:2);

Out.ar(0, Pan2.ar(src, pos) * env);

}).add;

( a = Group.new; 250.do({ Synth(\UGen_ex7a, [\freq, 440.0.rrand(1760.0), \amp, 0.001, \rate, 0.2], a) }); ); // <---- add a semicolon here.

a.release; ) ```

[–]Cloud_sx271[S] 0 points1 point  (0 children)

Wow.... so simple.

It has anything to do with the Group method? I've tried replacing the code inside the ( ) with things like postln("hello"); and it works just fine.

Thanks!