NodeProxy `clear` volume reset when source is pattern?

Hi there, I’m trying to clear (with volume fadeout) NodeProxies where the playback (monitor) volume is set to something other than 1. It seems to work fine for proxies where a synth is the source, but not when an event pattern is the source. Is there a “trick” to get this to fade out from the current volume for Pbind sources? Or is this a bug that should be reported?

Run these lines one at a time in order:

// "clear" fades out from the current play volume of 0.2
Ndef(\test, {Saw.ar([220,221], mul: 0.7)}).play
Ndef(\test).vol = 0.2
Ndef(\test).clear(5)

// "clear" seems to fade out from full volume (ignoring "current" volume of 0.2)
Ndef(\test, Pbind(\degree, Pseq((0..7), inf), \dur, 0.125, \amp, 0.7)).play
Ndef(\test).vol = 0.2
Ndef(\test).clear(5)

Thanks,
Glen.

Just a quick reply to myself… It seems that if I use stop(5) instead of clear(5) it works properly. I guess the clear resets the Monitor parameters immediately, rather than scheduling them to be reset in the future. So I can “solve” the problem myself by doing a Ndef(\test).stop(5) and scheduling a clear() after fadeOutTime has passed and the proxy is silent.

Still, not sure why it works properly for the synth case but not Event pattern.

1 Like