i see Juce has its own ADSR class. But I can’t figure out how to apply to it “Slope” it seems the envelopes only linear. By slope I mean the following (see decay on pic):
Can someone suggest please how to do this with minimal cost?
I thought to put the
float value = adsr.getNextSample() level through something like this:
pow(value, pow(2, -1.25f) but this only works in the case of attack and I don’t know the current state like decay/sustain/release.
I would be grateful if someone could suggest a simple and inexpensive solution. Thanks!