Unable to make parallel stream from different environments

Hello! I’m trying to use Ppar to combine Pbinds that have been “streamified” in different environments. The help file for the PLx suite describes “streamifying” in different environments:


I am using an array of Identity Dictionaries (called ~euclidDict) and calling the .use function on the dictionary when calling the Pbind. I can play each Pbind separately (two different EventStreams are created), but if I put those Pbinds in an array, and put that array in Ppar, the Ppar doesn’t work properly. It returns “an EventStreamPlayer” in the console, but no MIDI is output.

Here are the problematic parts of my code (full code is posted below):

e is a Pbind. This works (creates two separate event streams)

[~euclidDict[0].use { e.play }, ~euclidDict[1].use { e.play }]

This doesn’t work (returns “an EventStreamPlayer” but no midi output)

x = [~euclidDict[0].use { e }, ~euclidDict[1].use { e }]
y = Ppar(x, 1);

Is it possible to combine Pbinds in different environments into a single parallel stream?

Here is the complete code (this is a super-simplified version of what I’m hoping to do):

~mOut = MIDIOut.newByName("IAC Driver", "IAC Bus 1").latency_(Server.default.latency);

~euclidDict = [
	( notes: Pseq([60, 62, 64], 1), durs: Pseq([3, 3, 2], 1) ),
	( notes: Pseq([72, 74, 76], 1), durs: Pseq([5, 5, 5], 1) ),

e = Pbind( // proto-euclid
	\type, \midi,
	\midicmd, \noteOn,
	\midiout, ~mOut,
	\chan, 0,
	\amp, 0.6,
	\legato, 1.1,
	\midinote, PLn(\notes),
	\dur, PLn(\durs) / 4,

// Works (makes two separate event streams):
[~euclidDict[0].use { e.play }, ~euclidDict[1].use { e.play }]

// Doesnt work (returns "anEventStreamPlayer", but no midi output)
x = [~euclidDict[0].use { e }, ~euclidDict[1].use { e }]
y = Ppar(x, 1);

For the records, I replied in the forum.


for later reference: