You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bmSClib/NodeDictionary/makeBufferProcessingSynthDe...

32 lines
531 B

+ NodeDictionary {
makeBufferProcessingSynthDef {
SynthDef(this[\name], {
var buf = \buf.kr;
var signal = SynthDef.wrap(
func: this[\func],
prependArgs: [buf]
);
signal = Pan2.ar(
signal * \amp.kr(1),
\pan.kr(0)
);
if(this[\detectSilence].asBoolean, {
FreeSelf.kr(
DetectSilence.ar(
[signal[0], signal[1]] + Impulse.ar(0)
).product)
});
if(this[\limitDuration].asBoolean, {
Line.kr(0, 1, \dur.kr(1), doneAction: 2);
});
Out.ar(
\out.kr(0),
signal
);
}).add;
}
}