Dynamics Comp Makeup values
-
After playing with the dynamics module for a project, I found that the comp makeup was pretty hot.
Changing it's value to this in Dynamics.cpp made the result more manageable.auto gainDb = log2((1.0 - ratio) * attenuation * -1.0 + 0.1) + log2(attenuation * -1.0);
-
@dustbro Awesome mate. I'll try this.
Is it just this line in the Dynamics.cpp that needs swapping for the above one? (I thought I'd check before I break something) :)
Does it affect both the comp and limiter's auto makeup just changing that line? I've noticed that both have a pretty big rise in volume when you use them.
-
@SteveRiggs Thats the line. It's only for Compressor makeup. It looks like limiterMakeupGain is a few lines above.
-
This post is deleted! -
@dustbro Ah, I see it. Thanks.
It looks to be laid out slightly different to the comp one.
Do these 3 lines need adding into the limiters 'if' section?
(I'm thinking there might be a duplicate declaration problem if it's done this way?)
auto attenuation = limiter.getThresh(); auto ratio = limiter.getRatio(); auto gainDb = log2((1.0 - ratio) * attenuation * -1.0 + 0.1) + log2(attenuation * -1.0);
-
@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?