btw, it's also really nice to connect a resonating filter to the audio-rate ADSR,
though in the code, the frequency should get shifted to the left by about 6 to get it in the right rate, so:
or add an "octave" int selector to set a base octave range:
(param_octave should go from -10 to 0 in this case)
You can add a stage-output in the control-rate code of the envelope to use a switch module for selecting different values per stage:
and add a stage-output in the outlets.
Then use the stage output to select different values for the cutoff and resonance of the filter and/or dry/wet mix for each stage. Smoothing the selected values can also add some nice twists.
My "mostfilter" is able to give some nice atom-like resonances btw.