Hello everybody.
I am curious of how I could adresse some arguments of a Synth, which is created by a pattern, which is embedded in an Ndef. By using the arguments, ‘.set’ or ‘.gui’ of the Ndef. Maybe I’m also looking for a more favorable way of writing this kind of things, such as using the Pattern to trigger a Ndef of a Synth. But I’m yet not sure how to archieve this properly.
However here is my example code, and basically I’m looking for a way to change the \amp or \freq, since its not addressed in the pattern, this should be possible with an Ndef.
(
//simple Synth and Pdef
SynthDef(\sins,{|out=0,freq=440,amp=0.3|Out.ar(out,amp*SinOsc.ar(freq!2)*Line.kr(1,0,0.2,doneAction:2))}).add;
Pdef(\ptrn,Pbind(\instrument,\sins));
)
//starting the Ndef of a pattern
Ndef(\fdsa)[0]=Pdef(\ptrn)
Ndef(\fdsa).play
//how to address the amp or the frequency?
Ndef(\fdsa).gui
Thank you very much.