Bug in 7-segment envelope patch

Peter McCulloch's icon

The 7-segment envelope patch doesn't sustain infinitely. The duration for the sustain segment needs to be negative, otherwise it'll execute the entire envelope when you turn on the toggle, then execute the release segments again when you switch it off.

Max Patch
Copy patch and select New From Clipboard in Max.

Here's a fixed example. I also added the ability to scale the amplitude of the envelope by the trigger value (like adsr~ does).

Gregory Taylor's icon

Peter's correction and additional features are now part of the standard distribution. Thanks, Peter.