(
// Simple reverb effect
SynthDef(\reverb, { |in=0, out=0, mix=0.3, room=0.5, damp=0.5|
    var sig, wet;
    sig = In.ar(in, 2);
    wet = FreeVerb.ar(sig, mix, room, damp);
    Out.ar(out, wet);
}).add;

// Delay effect with feedback
SynthDef(\delay, { |in=0, out=0, delaytime=0.5, feedback=0.5, mix=0.5|
    var sig, wet, delayed;
    sig = In.ar(in, 2);
    delayed = CombL.ar(sig, 2.0, delaytime, feedback * 3);
    wet = (sig * (1 - mix)) + (delayed * mix);
    Out.ar(out, wet);
}).add;

// Low-pass filter effect
SynthDef(\lpf, { |in=0, out=0, cutoff=1000, res=0.5|
    var sig;
    sig = In.ar(in, 2);
    sig = RLPF.ar(sig, cutoff, res);
    Out.ar(out, sig);
}).add;

// High-pass filter effect
SynthDef(\hpf, { |in=0, out=0, cutoff=1000, res=0.5|
    var sig;
    sig = In.ar(in, 2);
    sig = RHPF.ar(sig, cutoff, res);
    Out.ar(out, sig);
}).add;

// Distortion effect
SynthDef(\distortion, { |in=0, out=0, amount=0.5, mix=0.5|
    var sig, dist;
    sig = In.ar(in, 2);
    dist = (sig * amount).tanh;
    Out.ar(out, (sig * (1 - mix)) + (dist * mix));
}).add;

"Effects SynthDefs loaded".postln;
)