Hello,
I still don’t understand fully how to manipulate the Ndef with all other methods. Generally i have lots of problems understanding Ndef, so I’ll try to formulate some of my struggle here, maybe it can be answered.
Also feel free to improve any of my example code, I wouldn’t know how to optimally write it.
I create a Synth def, and want to embed it into a Ndef. Then the Ndef gives me a reverb as effect. Finally i want to play this Ndef with a pattern. Can be Pbind, Pdef, or something like that. The Playing with the pattern, i didn’t manage to figure out in my methodology. I think it becomes clear from reading the code.
//making a SynthDef
(
SynthDef(\sins, {
|freq=440, out = 0|
Out.ar(out,SinOsc.ar(freq!2)*Line.kr(1,0,0.1,0.1,doneAction:2))
}).add;
)
Synth(\sins);
//refering a Ndef to this SynthDef (?)
Ndef(\sinn).play;
Ndef(\sinn).prime(\sins);
Ndef(\sinn).put(100,\filter -> {arg in; FreeVerb.ar(in)})
Ndef(\sinn).put(0,Ndef(\sinn).source,0,[\freq, 69.midicps]);
//create a pattern
(
x = Pbind(
// \istrument, \sinn, // this doesnt work obviously
\degree, Pseq((0..3), inf)
).play;
)
At this point I need a way to play different Ndefs, i guess with this ‘put’ format. (Btw i couldnt find a documentation for the put method on Ndefs…)
Anyways. Thanks for any solutions!
Also a Bonus question: I was wondering, since i create a chain of effects in this Ndef with the ‘\sins’ SynthDef. Is it somehow possible to route another Synthdef through this chain of effects? Well in this case the chain of effects consists only of 1 effect, the FreeVerb one.