AFAIK the gate for an env-gen is just binary, it opens when it's above zero and closes when it's below zero. At that point it should still play the "release" part of the envelope, which it seems in vintage-base is 0.8 seconds.
> You also can’t use ugens like that outside of a defsynth. Ah, thanks! I had begun to suspect I was trying to do something incompatible with the runtime. I’ll take another tack.
This works nicely, using the larger negative “Forced release” gate value for a longer release.
(ctl (synth/vintage-bass 40) :gate -10)
Also this, allowing some room for the attack before setting the :gate
(at (+ (now) 2000)
(ctl (synth/vintage-bass 40) :gate -10))
It sounds like the Forced release overrides the release time in the envelope (0.8s in vintage-bass).
Thanks again!So you’re saying this (from env-gen docstring) doesn’t actually work? > ; gate If the gate of > ; an env-gen is set to -1 or below, > ; then the envelope will cutoff > ; immediately. The time for it to > ; cutoff is the amount less than -1, > ; with -1 being as fast as possible, > ; -1.5 being a cutoff in 0.5 > ; seconds, etc. The cutoff shape is > ; linear.
Hah, didn't know that was a thing. https://doc.sccode.org/Classes/EnvGen.html#Forced%20release
But seems there's some nuance about using the last node in the envelope
Sending (ctl my-note :gate -1) after triggering the note works.
But I’d like to specify the duration when I play the note and forget it. The following - dropping :gate below zero after 3 seconds using a line ugen - doesn’t work, either.
(synth/vintage-bass :gate (overtone/line:kr 1 -0.01 3.0))I see, you were passing the gate parameter in on invocation? That's not how gates work. They need to cross from positive to negative. You also can't use ugens like that outside of a defsynth. Maybe your best option is to copy that synth over to your own code and tweak the envelope itself?