Thank you for the reply , it’s a little simpler than the solution I ended up finding:
(
e = Bus.audio(s, 1);
(SynthDef(\rev, {|in=\e, predelay=0.1, room=0.8, damp=0.5|
var rev;
rev = DelayN.ar(In.ar(in), maxdelaytime:0.3, delaytime:predelay);
rev = FreeVerb.ar(rev, mix:1, room:room, damp:damp);
Out.ar(1, rev); // the reverb goes out on bus 1 (right)
}).add;
))
~rev = Synth(\rev, addAction: \addToTail);
(
SynthDef(\sin, {|freq=440, direct=0.5|
var env, sig;
env = EnvGen.kr(Env.perc(0.01, 0.2, curve:-4),doneAction:2);
sig = SinOsc.ar(freq)*env;
Out.ar(0, sig * direct ); // the sound without reverb goes out on bus 0 (left)
Out.ar(e, sig * (1-direct)); //… and with reverb
}).add;
)
~s = Synth(\sin, [\direct, 0.5]); // adjusting the ratio between direct sound and reverberated sound