Good morning!
@tulamide
Your approach was more elegant than mine and used less CPU. However, the actual code was, shall we say, somewhat less than adequate for its intended function.
This sets stage to zero when stage < 2, irrespective of the previous stage value calculation. The bool comparison (stage >=2.0) is false when stage == 1, so the
previous value of
stage is overwritten with zero.
This one works:
Code: Select all
stage = stage +2 &(stage == 2)& (mode>0.5);
Here,
mode is the streamin name that enables the AD(S)R function.
With this approach the previous value of
stage is preserved, and only set to 4 when it’s at 2 (by adding 2).
@ Kevin
The attached schematic has the modified linear ADSR (using tulamide’s approach) and an exponentiation module where you can choose the steepness you want. I find Expo 1 the best for more natural volume contouring. This uses the cheapest method to get an
approximated exponential response.
I’ve also included Martin’s exponential ADSR. I couldn’t modify the ASM version so I used the DSP code version to give the AD(S)R option. The code line I added differs from the one above because Martin’s stage system differs, so it’s a little more involved.
I don’t think the AD(S)R function I added to Martin’s is as useful, because it needs to decay
exponentially to the set sustain level, before going into the release phase. Where Martin’s might be better is for very fast attacks, because the Attack phase is linear rather than exponential. That gives a more sudden increase in volume for more initial punch.
You say you can’t open my earlier schematic and I have no idea why. I use only 3.06 and it seems tulamide was ok with it (also 3.06). Maybe you could make a backup and re-install 3.06…
Hope this is helpful and good luck.
Cheers
Spogg