Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adsr_bias skips decay if gate closes during attack. #193

Open
marchingband opened this issue Aug 4, 2024 · 4 comments
Open

adsr_bias skips decay if gate closes during attack. #193

marchingband opened this issue Aug 4, 2024 · 4 comments

Comments

@marchingband
Copy link
Contributor

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
Copy link
Contributor Author

@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?

@DBraun
Copy link
Contributor

DBraun commented Aug 4, 2024

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.

@marchingband
Copy link
Contributor Author

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
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants