faustlibraries icon indicating copy to clipboard operation
faustlibraries copied to clipboard

adsr_bias skips decay if gate closes during attack.

Open marchingband opened this issue 1 year ago • 4 comments

It's been about a year since I worked with another community member here on the adsr_bias family, and I sadly have forgotten how this really works.

My belief is that if a gate closes during the Attack phase, it should proceed to the Decay, before the Release. I am noticing that in adsr_bias, it instead proceeds to Release, which sounds very unnatural, and I don't think correctly matches the behaviour of a typical ADSR module in a synth.

For example a patch with fast Attack and Decay, a low Sustain level, and a slow Release will produce a "pluck" sound, but if the player lifts their finger too fast, triggering the gate to close before Attack is done, then the envelope may stick open, and essentially sound much louder and certainly out of place.

marchingband avatar Aug 04 '24 22:08 marchingband

@DBraun what do you think? Is there a reason it is the way it is? Is there an easy flag we could add to optionally work one way or the other?

marchingband avatar Aug 04 '24 22:08 marchingband

What you described is how I remember wanting it to work, but now I understand the issue you're describing. What do you think the better behavior would be? Would it not have the opposite issue of "using the decay" (short) when the user expects to "use the release" (long)? I don't have access to a DAW for another few days but I'll eventually want to examine how some plugins approach this.

DBraun avatar Aug 04 '24 22:08 DBraun

It's a little complex now that I think it all the way through.

A) Gate closes during decay: do nothing. B) Gate closes during Attack, and we are above the Sustain threshold: apply the Decay, and then proceed to Release. C) Gate closes during Attack, and we are below the Sustain threshold: apply the Release.

marchingband avatar Aug 04 '24 23:08 marchingband

Looking at some ADSR modules in VCV Rack, it looks like I am not correct, they seem to work like the current implementation.

marchingband avatar Aug 14 '24 04:08 marchingband