Also need to set the bus value for the 1st env/event to work properly, since buses are not re-initialized on the server when reallocated (reallocation happens entirely on the client). I’m still getting a premature cutout at the end for now, though (and Pproto warns that it doesn’t know how to clean event type \bus which sets rather than allocated as a bus. Frankly, the bus allocation event(s) like \controlBus could probably lookup the \array value to initialize the bus too)
(p = Pproto({ var onres;
a = ~ampBusNum = ((type: \controlBus, channels: 1).yield)[\out];
("c" ++ ~ampBusNum).postln;
(type: \bus, out: ~ampBusNum, array: [0]).yield.postln; // set bus value
onres = (type: \on, instrument: \beep, amp: "c" ++ ~ampBusNum, freq: 660).yield;
onres.postln;
~egroup = (type: \group).yield;
~egroup.postln;
}, Pbind(
\instrument, \menv, \addAction, 1, \group, Pkey(\egroup), \out, Pkey(\ampBusNum),
\dur, Pseq([0.2], inf),
\legato, Pseq([0.5, 0.7, 0.9, 0.975, 1, 1.1, 1.151])
)).trace.play);
Oddly the premature cut-out only happens in 3.11.0 but not in 3.10.4… I’m not sure why…