From 2b01058183bdbab5ddf50905d34db2138946e276 Mon Sep 17 00:00:00 2001 From: Mick Grierson Date: Thu, 20 Oct 2011 18:03:32 +0100 Subject: autogain compensation for the compression --- maximilian.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'maximilian.cpp') diff --git a/maximilian.cpp b/maximilian.cpp index bbc36de..c7396e1 100644 --- a/maximilian.cpp +++ b/maximilian.cpp @@ -881,7 +881,7 @@ double maxiDyn::compressor(double input, double ratio, double threshold, double holdcount=0; releasephase=0; attackphase=1; - if(currentRatio==0) currentRatio=0.01; + if(currentRatio==0) currentRatio=ratio; } if (attackphase==1 && currentRatio0.) { - currentRatio*=release; - + currentRatio*=release; } if (input>0.) { @@ -904,7 +903,7 @@ double maxiDyn::compressor(double input, double ratio, double threshold, double output = input/(1.+currentRatio); } - return output*ratio; + return output*(1+log(ratio)); } -- cgit v1.3