Dynamics Comp Makeup values
-
@dustbro Hey man. I just got around to trying changing the comp line in the .cpp for the makeup gain but it seems to still make it get really loud when the threshold is pulled down. Is that what it's supposed to do?
I'm trying to find a way so that the level stays as even as possible when changing the threshold with no huge jumps or drops in volume. Is there a way to do that using the same method?
-
@SteveRiggs Technically speaking, keeping the level even would just be another compressor. All of the makeup gain math I've seen is a formula of the threshold and ratio settings. If your input signal is really low, you'll have to crank down the threshold to start compressing, but doing so will increase the makup gain level. You can tinker with the formula to find something that works for your situation.
And just to be sure, once you changed this line, you recompiled HISE and used the new version, right?
Changing the code alone in Dynamics.cpp will not work. -
@dustbro said in Dynamics Comp Makeup values:
And just to be sure, once you changed this line, you recompiled HISE and used the new version, right?
Ahhh, that I didn't do My bad! I will try it. Thanks.
@dustbro said in Dynamics Comp Makeup values:
keeping the level even would just be another compressor
I was thinking if maybe that was an easier option. Hopefully, it wouldn't add any noticeable latency if running a few dynamics modules. I'll experiment with a few things. Thanks man
-
Did a little more tinkering
if (compressorMakeup) { if (compressor.getThresh() >= 0.1f) { auto attenuation = compressor.getThresh(); auto ratio = compressor.getRatio(); auto gainDb = log2f(-attenuation / ratio); compressorMakeupGain = (float)Decibels::decibelsToGain(gainDb); } else { compressorMakeupGain = 1.0f; } } else compressorMakeupGain = 1.0f;
-
@dustbro Cool! Hows it sounding?
-
@SteveRiggs My favorite so far. Nice and even output.
-
@dustbro Skills mate! I'll recompile and try it this eve.
I had a go at doing it for the limiter as well but the code is laid out slightly differently for the limiter section so I'm not sure how it would work for that part. Any ideas?
-
@dustbro Sir, Could You Please Upload The Dynamics.cpp File! So We Can Swap Them!!!
Because I'm All New To This And Don't Want To Mess Up The Codes
Thanks -
@Natanr
Here you go
I haven't compiled it and tested it yet so make a copy of the original Dynamics.cpp file and put it to one side before you change it in the source code, just in case.
-
@SteveRiggs I'm gonna look at the limiter code next
-
@dustbro Awesome :)
-
@SteveRiggs Thanks Steve, I Really Appreciate You Man
-
@Natanr No worries mate :clinking_beer_mugs:
-
and my final resting place:
if (compressorMakeup) { auto attenuation = compressor.getThresh(); auto ratio = compressor.getRatio(); auto gainDb = (1.0 - ratio) * (attenuation * -1.0) * 0.7; compressorMakeupGain = (float)Decibels::decibelsToGain(gainDb); } else compressorMakeupGain = 1.0f;
-
@dustbro Nice! Even smoother now?
-
@SteveRiggs for now.....
-
@dustbro
-
-
@SteveRiggs the limiter makeup gain is set exactly to the inverse of the threshold control.
(limiter.getThresh() * -1.0);
You could divide into that equation to dull down the limiter makeup gain.
maybe something like:((limiter.getThresh() * -1.0) * 0.2);
That would give you 20% of the existing value as makeup gain.
-
@dustbro Awesome! Thanks man, I'll try this out.
...and perfect timing as well. Just about to recompile the new version :) Legend mate. Cheers!