There’s no problem with that – the problem here is based on two conflicting elements:
- The envelope terminates the synth;
- But the filter resonates a bit longer than that.
If you use DetectSilence
to stop the synth (based on the filter decay) and delete the doneAction from the envelope, then you can have the filter after the envelope.
This is the basis of modal synthesis using Klank, DynKlank or a bank of Formlet filters, btw. It’s one of my favorite synthesis techniques. It’s completely legit – but you can’t use the normal pattern of EnvGen.ar(..., doneAction: 2)
for it.
sig = something * EnvGen.ar(...); // no doneAction
sig = LPF.ar(sig, ...); // or other filter
DetectSilence.ar(sig, doneAction: 2);
... and output as usual...
hjh