Synthdef …making presets
I put 1< parameters in a set to make presets for a single synthdef.
The issue is I first have to trigger the synth with w=synth , then I can click the w.set parameters
I would like to click the w.set parameters first and then trigger the synth but this gives a n set node failure
Is this possible ?
(
SynthDef(\effem,
{
arg moddetune=1,modratio=2,carrierratio=1,carrierdetune=(-1),moddepth=8,att=4,decay=4.500;
var mod,carrier,modenv;
mod=SinOsc.ar(220+moddetune*modratio);
modenv=EnvGen.ar(Env([0,1,0],[att,decay],[0,-2]),doneAction:2);
mod=(moddepth*mod)*modenv;
carrier=SinOsc.ar(220+carrierdetune*carrierratio,mod)*0.3!2;
Out.ar(0,carrier);
}).add
)
w=Synth(\effem);
w.set(\decay,2.5);
w.set(\at,2);
w.set(\moddepth,10)
w.set(\moddepth,5);
w.set(\moddepth,2);
w.set(\moddepth,100,\modratio,2,\moddetune,6,\carrierratio,1,\att,5,\decay,8);///lots of parameters in one
w.free;