Odd ADSR issue: rapidly pressing notes doesn't reset the envelope

Hello,

I’m using the Maximillian sound library for ADSR, and I’ve had this problem ever since I started working on this Synth.

The problem is, if I hit a note with high decay, and hit another note before the first one silences, the second note plays at a lower volume.

I’ve tried resetting trigger of Maximillian’s Envelope class on SynthesiserVoice’s start note, among other things, with no luck. Any ideas?

fixed.

Do you mind mentioning how you fixed it? I’m currently facing this issue with the regular ADSR class, but the same behavior occurs - with a high decay and no sustain, notes will take forever to fade if the user presses the key really quickly. I noticed that if you release the key before the decay actually decays (and the sustain is at 0.0f) then it just hangs at whatever it’s currently at and slowly fades out.

I’ve got no idea why this is going on, been trying to solve this all day.