Code: Select all
rect = abs(input);
if (rect > envelope) filterCoef = attackCoef;
else filterCoef = releaseCoef;
envelope = rcFilter.filter (rect, filterCoef);
http://www.learningelectronics.net/work ... zener.html
So, i’ve created my own rectify function to smooth the bottom part of the waveshaper. The compressor began to sound better.
Second, I don’t think there is something like “if” in analog compressors, I’ve tried with lowpass(filterCoef) and linear scale too, but these have not worked well.
so here is my question:
How can I replace the use of “if” to get a smooth transition between attack and release coefficients?
Thanks
