This is a note-triggered ADSR envelope for sending MIDI CC values. It can be useful for synths with limited envelopes, triggering volume swells, controlled ducking, etc.
Set the time for the attack, decay, sustain, and release stages of the envelope. Set the level for the attack and sustain stages. Then send any note to the plugin. CC values will be output following the envelope’s shape.
If the note is held down, the envelope will stay in the sustain stage until it is released. Retriggering a note before the end of the envelope will interrupt the envelope and restart from the beginning.
You can also enable velocity sensitivity, which scales the envelope according to the velocity of the note received. To increase the maximum stage length, edit the “default_maxtime” parameter at the top of the script.