Hey, im trying to have two synth nodes routed to two different output channels. synth A should go to output channels [0, 1] and synth B should go to output channels [2, 3]. they should both be hard panned (A to the left speaker and B to the right speaker).
In addition i would like to use PbindFx
to apply a Comb Filter Fx with the possibility of sequencing different settings for Synth node A and Synth node B independently. when i apply the Comb Filter Fx with PbindFx
its not working because of either a bus mismatch or they both end up on output channels [0, 1]. I would also like to use two different external control LFOs to modulate the phase of the Synths (which is not making so much sense with this \test SynthDef
, but with the actual one it does). any ideas? thanks a lot
(
SynthDef(\test, {
var gainEnv = EnvGen.kr(Env.perc(0.01,0.4), doneAction: Done.freeSelf);
var sig = SinOsc.ar(\freq.kr(150), \phase.kr(0)!2);
sig = sig * gainEnv;
sig = Pan2.ar(sig, \pan.kr(0), \amp.kr(0.25));
Out.ar(\out.kr(0), sig);
}).add;
SynthDef.new(\combL, {
arg mix=(-0.5), decay=1, delHz=0.55, delStereoRatio=0.9, delMin=0.001, delMax=0.4;
var sig, comb;
sig = In.ar(\in.kr(0!2), 2);
delHz = delHz * [1,delStereoRatio];
comb = CombL.ar(
sig,
delMax,
LFPar.kr(delHz,[0,pi/2]).exprange(delMin,delMax),
decay,
);
sig = XFade2.ar(sig, comb, mix);
Out.ar(\out.kr(0), sig);
}).add;
)
(
p = Pbind(
\instrument, \test,
\dur, 0.5,
\midinote, [60, 71],
\phase, [ ~bus[\ctrl][0], ~bus[\ctrl][1] ].collect(_.asMap),
\amp, 0.20,
\pan, [(-1.0), 1],
\out, [0, 2],
\group, ~mainGrp,
);
)
(
x = { Out.kr(~bus[\ctrl][0], LFTri.ar(0.5).linexp(-1, 1, 1, 2)) }.play;
y = { Out.kr(~bus[\ctrl][1], LFTri.ar(2).linexp(-1, 1, 3, 4)) }.play;
q = p.play;
)
(
q.stop;
x.free;
y.free;
)
(
p = PbindFx([
\instrument, \test,
\dur, 0.5,
\midinote, [60, 71],
\amp, 0.20,
\pan, [(-1.0), 1],
\out, [0, 2],
\fxOrder, [1]
],[
\fx, \combL,
\in, [0, 2],
\mix, 0.5,
\amp, 1,
\delStereoRatio, 0.9,
\delHz, 0.05,
\delMin, 0.1,
\delMax, Pkey(\delMin) + 0.01,
\out, [0, 2],
\decay, 1,
\cleanupDelay, Pkey(\decay)
]
);
q = p.play;
)
q.stop;
s.meter;