I have a PdefGui, playing back a Pbindef. I’d like to code it so that the Pbindef fades out when you close the PdefGui. I tried the following code, but I think I must be referencing something incorrectly. Does anyone see the error in my ways?
Yes, I’m afraid the issue is the fade envelope - not the GUI command. I should have made that more clear in the original post. Pbindef(\test).clear works perfeclty well - but Pbindef(\test).clear(10), for instance does not seem to obey the fadeTime control when a Pdef is inside a PdefGui. Maybe I am overlooking something important, though.
One other thing I’ve noticed in the archives here is using a simple fade envelope, i.e:
~f = { |start, end, time, curve = 0| Pseg(Pseq([start, Pn(end)]), time, curve) }
One thing I was unclear on - is there a way to process a Pbindef so that I can simply multiply whatever the current \amp key is holding by a fade envelope?