A question to the dev´s about the feature "auto gain"

this is a very general question about the autogain function in most dynamic (vst) plugins.
I was trying a new compressor yesterday and thought “ok, there it is again…”, after comparing the input vs. the output level, i saw that the output was always 1db higher, then the input (which isn´t too bad compared to other plugins).
I´m an audio engineer and in my understanding/world the auto gain function should automaticly provide the same level at the output as it comes in the input to make sure, when you compare the effected signal with the dry one, you´re not “blinded” by the psychoacoustic louder=better thing.
Now my question, which comes up every time i stumble upon another auto gain :
Is it
A) , that i don´t get it right and auto gain is a function for another purpose and i was tought wrong ?
B) , really just a advertisment trick to fool (new) users into thinking “wow, it´s suddenly soooo loud” ?
C) , that there is a unsolved mystery in programming, which makes it impossible to automaticly compare and even out 2 levels ?

[I´ve been told, that people sometimes don´t get my humor, so i want to make clear, that option C) is only added for ironic purposes. Also the whole topic is kind of ironic, because the answer is obvious, but i would like to have it confirmed by an developer, without calling any brand out of course.]

1 Like

I have a load of plugins, oodles in fact. A plethora if you will.

None of them has this ‘autogain’ setting whereof you speak.

There are some compressors – the Ableton Live Compressor device comes to mind – that have an automatic gain make-up setting. But that just works by doing some math on the compressor threshold and ratio, and it isn’t perfect.

And if you really are an audio engineer, you’d know that perfectly tuning make-up gain is a hard problem, depending on the audio processing.

This feature is very common in dynamic plugins at least at the ones i´m working with. The one of Ableton is a good example.
Sure, you don´t have to trust me, but i am an real audio engineer. I´m not a programmer at all, that´s why i have this question. In my laiman programmer mind it shouldn´t be a problem to analise the input and set the same at the output …or is it really ?

What is meant by analyze the input and set the same at output? Are you measuring level by peak value, or by RMS level or by some other measure?

The calculation is straightforward some of the time, as with a brick wall limiter, because you can set the gain on the output to match the threshold. That will guarantee that the input and output peak the same. Of course it will still sound louder, because you’ve lowered the dynamic range – by limitiing – and then make it louder with makeup gain. The apparent (and measurable RMS) level is louder.

And for things like a filter, it’s more difficult because the level is frequency dependent. There are filters (in the analog world as well) that compensate for the known level loss the filter causes, but they’re not the norm, in both real and virtual gear.

I have to tweak the gain on my Roland Jupiter 6 depending on filter resonance, and even so I have to be careful and use compression to keep it from getting unruly.

I mean the peak value of course, let´s say you go in with -6db and the output is leveled to -6db accordingly. With an equal In/Out level i can then compare the compressed with the uncompressed signal without an actual change of the (peak) level, but a higher RMS.
That you have to compensate the level manually , when you use a higher resonance on a filter is clear, my question is really only pointing at dynamic processors (like compressors and limiters).
In my daily work the first thing i do, when using dynamic processors with an auto gain, is to turn it off and raise the output manually after setting the parameters.
I just wish the feature would work as expected (as i learned it in school) and i could save a couple of seconds each time i compress something. :wink:

This just came to my mind : Is the auto gain “not working properly”, because it is measuring a too short amount of time ?
I mean, when i compress and set the output afterwards, i have to listen to the whole track sometimes, if i´m not sure where the highest peak is and/or the compression is changing the transients.
I guess to work, an auto gain would have to analise to the whole thing before and after as well to set it “right” and i just answered my own question.

I’m betting most ‘auto gain’ switches aren’t very smart – they look at the threshold on the input and add that much gain to the output.

That doesn’t work so well if the attack setting is slow, because peaks slip through the compressor and the makeup gain can make it too loud.

If you tried to measure the input signal level in real time and use it to add back gain it would get pretty weird sounding too, depending on other compressor settings.