I think I've got them all squashed. Here's V3. The raw module takes times in seconds and sustain as a decimal from 0-1. The uModule version knobs max times per step are 3 seconds and have a quadratic curve. Let me know if you find any more bugs! 10:38 found another one! 11:05 V4 posted 11:13 found another one! 11:40 V5 posted - surely this is the last one! lol
As I've often said, "there's always one more bug". Having been a programmer since before there were PC's, you would think I would have it figured out by now! I guess that's why I'm willing to be patient when the occasional bug shows up in software I've purchased. If I can't write bug free stuff, why should I expect it from others? Audulus has been fairly free of significant bugs, and Taylor had done a good job of fixing them as they are reported. If there's a bug now and then I totally understand.
Now that I've fixed the bugs (I hope), I took some time to refine the design. I reduced the CPU load by about 30% and added gate outputs for each stage to the basic module for external switching. No functional change from V5.
Great stuff! One suggestion - maybe use a delay node for the gate delay? If you press notes too quickly depending on the gate delay, the envelope won't retrigger.
Very nice. Another suggesion, on analog EGs the attack exponential is stopped before reaching it's maximum, check http://www.earlevel.com/main/2013/06/02/envelope-generators-adsr-part-2/ ("Time" section) (Part 1 is worth the read too). At the moment there's a pronounced plateau before reaching the next section.
@biminiroad, I’ll check on the retrigger, @SansNom, interesting read. I currently have the “finished” threshold set to 0.99, so the exponential has very nearly finished before the next segment is triggered. I can see some advantages to intentionally overshooting and truncating the exponential early.
@biminiroad, I think the retrigger is working. When it retriggers, the delay restarts, so if you’re repeating notes faster than the delay time, the attack never starts and you won’t see any output. I’ve verified that it’s retriggering correctly well into audio frequencies.