(
SynthDef(\saw, {|amp = 0.8,freq1 =500, freq2 = 800, pan= 0.5, amt=0.5 distortion= 0|
var snd, amp2;
amp2 = amt.linlin(0.0, 1.0, 1.0, 0.2); // if amt is 1.0 we reduce amp to 0.2
amt = Lag.kr(amt, 0.01); // lag time
snd = LFSaw.ar(freq1,0, 0.3);
snd= (snd*distortion.lincurve(0, 1, 1, 1, 40)).tanh;
snd = snd.tanh;
snd = Integrator.ar(snd, amt);//distortion effect
DelayN.ar(snd, amt, mul: amt);
snd = Feedback.ar(snd, amt);
snd = snd* (amp) * amp2;
snd = Pan2.ar(snd, pan);
Out.ar(0, snd);
}).add;
)
Synth(\saw).set(\amt, 0.1);
Synth(\saw).set(\amt, 0.9);
I have a question about controlling Synthdef with one or several parameters.
In this code, \amt, is the parameter to control Synthdef.
For instance, amt : 0 for dry signal amt: 1 fully wet, 100% long reverb/delay, and distorted sounds.
And I want to control the values of amt to control the different ways of behavior.
It has some changes within a synthdef, but It does not dramatically change depending on the parameter. Like parallel processing of source + fx bus track.
Is that a weird approach in SC, or was I missing something? Or Are there any tips for it??