Pbindef fade in and fade out

p=ProxySpace.push(s.boot);
~test = Pbindef(\x,\instrument,\default,\dur,1,\amp,1,\midinote, 60);
~test.play(fadeTime:5);
~test.stop(fadeTime:10);

See also this recent thread

As @semiquaver has mentioned it, the tutorial ‘Event Patterns and LFOs’ is contained in miSCellaneous_lib

You could e.g. gradually mute a Pbindef by replacing its amp stream

Pbindef(\x,
	\midinote, Pwhite(60, 90),
	\dur, 0.2,
	\amp, 0.1 
).play
	
Pbindef(\x, \amp, Pseg(Pseq([0.1, Pn(0)]), 10))

Pbindef(\x, \amp, Pseg(Pseq([0, Pn(0.1)]), 10))