(
SynthDef(\omnichord, {
    arg freq = 440, amp = 0.3, releaseTime = 2.0, fmIndex = 1.0, fmRatio = 2, gate = 1;

    var sig, env, osc1, osc2;

    osc1 = Saw.ar(freq);
    osc1 = RLPF.ar(osc1, 1200, 0.1);

    osc2 = SinOsc.ar(freq * fmRatio, 0, fmIndex);

    sig = osc1 + osc2;

	env = EnvGen.ar(Env.adsr(attackTime: 0.01, decayTime: 0.3, sustainLevel: 0.5, releaseTime: 0), gate, doneAction: 2);

    sig = sig * env * amp;

	Out.ar(0, sig!2);
}).add;
)