The reason for the reversal is a little convoluted, maybe. I have been archiving the Events and using them to replace other Pbindefs while playing. This means archived Events are a little truncated because their key names are removed. Events are inserted into new Pbindefs, which then need to be converted back to Events, in order to use EnvirGUI.
I'm sure there is something I'm just not grasping here - and I'm sorry to be nuisance about it! Maybe this all makes more sense with PLbindef, which I will look into immediately.
The overall code would actually look a little more like this:
(
~patt = "( 'sus': Pwhite(0.5, 0.8), 'rel': Pwhite(0.01, 0.3), 'degree': Pseq([ 0, 2, 3, 4 ], inf), 'dur': Pseq([ 0.2 ], inf),
'octave': Prand([ 5 ], inf), 'dec': Pseq([ 0, 2, 3, 4 ], inf), 'instrument': 'nil')";
~patt = ~patt.interpret;
~patt = ~patt.array;
~finalPatt = {|m| ~patt};
);
(
n = Pbindef(\d, *~finalPatt.());
e = PbindefEvent(n);
w = Window("", Rect(0, 0, 300, 300));
PdefGui(n, parent: w, bounds: Rect(0, 0, 50, 10));
q=EnvirGui(e, 24, parent: w, bounds: Rect(40, 0, 600, 90));
w.front;
);
Thanks again for all of the help - I really do appreciate all of the work you've done for the SC community.