Sending values generated by one Pbind to multiple synths

Is it possible to send the values generated by one Pbind to several synths? I am aware of how I can use Pchain and Pbindf to reuse the same Pbind definition but the problems is that, if the Pbind contains any kind of randomness, this will play out differently in each instance of the Pbind. What I need is to double each note (and other values) generated by one Pbind with several synths, like if this was supported:

Pbind( \instrument, [synth1, synth2, synth3], …more…keys…).

How do I achieve this?

Sticking with Pbindfs, you can duplicate the randomness by wrapping Pseed, around either specific Pattern elements, or the entire Pbind:

(
SynthDef(\simpSin, { |out, freq = 440, amp = 0.1, att = 0.01, rel = 0.5, da = 2|
	var env = Env.perc(att, rel).kr(2);
	var sig = SinOsc.ar(freq);
	sig = sig * env * amp;
	sig = Out.ar(out, sig ! 2)
}).add;

SynthDef(\simpTri, { |out, freq = 440, amp = 0.1, att = 0.01, rel = 0.5, da = 2|
	var env = Env.perc(att, rel).kr(2);
	var sig = LFTri.ar(freq);
	sig = sig * env * amp;
	sig = Out.ar(out, sig ! 2)
}).add;

SynthDef(\simpSaw, { |out, freq = 440, amp = 0.1, att = 0.01, rel = 0.5, da = 2|
	var env = Env.perc(att, rel).kr(2);
	var sig = LFSaw.ar(freq);
	sig = sig * env * amp;
	sig = Out.ar(out, sig ! 2)
}).add;
)

(
a = Pbind(*[
	dur: Pseq([0.5, 0.6, 0.3], inf),
	freq: Pseed(0, Pwhite(100, 1000).round(50)).trace(prefix: "freq: "),
	rel: Pseed(1, Prand([0.5, 0.6, 0.3], inf)).trace(prefix: "release: "),
])
)
(
Pbindf(a, *[instrument: \simpSin]).play;
Pbindf(a, *[instrument: \simpTri]).play;
Pbindf(a, *[instrument: \simpSaw]).play;
)

Thanks @thresholdpeople, this works for me:)

1 Like