I’ve been attempting to build an envelope generator that, when triggered, generates an attack and decay phase (no sustain or release), but ignores new triggers on the attack phase.
What I managed to build so far is almost there, but there is a downwards “spike” in the transition between the attack and decay phases, and when using the envelope to control a VCF or VCA it results in an audible click.
Welcome to the Forum! Glad to have you with us. This is the simplest circuit I could come up with. The module takes an attack and decay time in seconds and a trigger. It won’t retrigger during the attack phase but will during the decay. I found it simplest to use two timer nodes to allow for different attack and decay times. Since nothing in Audulus actually occurs simultaneously, glitches are easy to introduce. (Been there, done that lol). Attack Decay.audulus (21.9 KB)
My pleasure! Always glad to help. You might find these utility modules useful. They’re pretty well debugged for the most part. Saves re-inventing the wheel. Assorted Logic Modules
The glitch removal option reminds me of my old KLH Burwin Impulse Noise Eliminator, which, up to last week was happily chopping tics and pops from my records. It operated (RIP TNE 3000!) on the principle that the recorded content was band-limited and therefore can be differentiated from what they called 'first generation signals," the tics and pops made from spot defects in the vinyl. If you really know your sound source, you can usually find a slew rate value (volts per second, for example) that no intended signal will ever produce. A simple comparator expression and a unit delay node could detect a sample to sample change above that limit and just replace that sample with either the last sample that passed muster or an interpolation of its nearest neighbors.