Jump to content

Audio Normalizer


Recommended Posts

Yes, I'm digging out this old thread, for I have the same questions. Is there any documentation available on this feature? I am familiar with dynamics processors and their terminology, but this one leaves me rather clueless due to its arbitrary and unitless values and ranges. Squad? Anyone? Any answers would be most appreciated.

Thanks

A.

Link to comment
Share on other sites

Shooting ideas out my butt, but just based on the label I would expect it to be some sort of automatic gain control (AGC) that makes the sound louder when quiet and quieter when loud, so that you can hear stuff (and not have your ears blown out) regardless of if you're drifting through the endless void or sitting atop a 3000t rocket.

If my guess is correct, then 'responsiveness' controls how quickly the filter reacts to new data. A fast responsiveness will adapt quicker but may overreact to something loud and short like an explosion, whereas if it is slow it will be steadier (and more accurate) over time, but may take some time to converge to that state.

'Threshold' is more mysterious to me, but I would guess it is some regularization that keeps the louds slightly louder than the quiets (and vice-versa) so that the AGC does not wash out all of the dynamic range.

These values are unitless because audio is generally dealt with in unitless quantities (since you have a speaker amplifying everything, adding any units would be a waste anyway). However, it is likely that 'Responsiveness' corresponds to the forgetting factor (or maybe its logarithm) for a single-pole IIR filter that acts on the audio energy over short time windows or individual samples.

Based on my assumptions, a model for the Normalizer could be given by this recursion:

a[n] = (1-R)*a[n-1] + R/sqrt(T + x[n]^2)

y[n] = a[n]*x[n];

where a[n] is the gain at time n, T>0 is related to 'threshold', and 0<R<1 is related to 'responsiveness', x[n] are the raw audio samples from the game and y[n] are the normalized samples

Link to comment
Share on other sites

A normaliser is essentially the same as an audio compressor.

What it tries to achieve is to make quieter sounds louder, and at the same time, any really loud sounds a bit quieter.

This 'should' give you a more consistent audio level while playing instead of, for example, really quiet rocket sounds and then suddenly and immensely loud bang.

The threshold is when it will start becoming active on a particular sound. Il have to check this, but i assume its working as a compressor threshold i.e. bigger value means quieter overall sounds. Although it could also be acting as a gain ratio... Il check this in a bit.

The responsiveness is just that, how fast it will react to a change in sound, a smaller value should make it act less harshly with a larger setting making it only react for prolonged sounds or those with excessive energy.

Just note, the two here are a rather crude way of normalisation. From an audio engineers perspective you would normally have many more variables so... I'm kinda guessing at which way the sliders work based on the assumption that responsiveness is done in ms (i.e. 16ms from your screenshot) and the normalisation as a compression ratio, as stated above.

Hope this helps.

Edited by thirstyemu
Link to comment
Share on other sites

  • 1 year later...

(yes this is a necro, but it's directly related)

Has anyone played around with these values much in 0.25? Are the default values good/bad? I'm thinking that the Responsiveness value is too low at just 16 and should be higher by default.

Guess I'll have to crash some things in sandbox mode and see if I can get better audio out of KSP.

Link to comment
Share on other sites

(yes this is a necro, but it's directly related)

Has anyone played around with these values much in 0.25? Are the default values good/bad? I'm thinking that the Responsiveness value is too low at just 16 and should be higher by default.

Guess I'll have to crash some things in sandbox mode and see if I can get better audio out of KSP.

I'm sorry to assist in this necro, but I would also be curious to know if anyone has any recommendations for different settings besides those that are default post .25.

I find that at times, some of my KW Rocketry engines and KAS sounds do not play as they should; and it's not an installation issue.

Link to comment
Share on other sites

  • 4 months later...
  • 6 months later...
  • 1 year later...
On 3.5.2015 at 6:04 PM, viktor19 said:

By reviving it after 6 months?

I can do one better, even, revive it after 13!

So, dear Squad, could we please get documentation, labeling, explanation, confirmation, or anything else that makes clear, without doubt, what these sliders and their values affect, and how?

zW4d3ca.png

Thanks

Edited by Andersenman
Link to comment
Share on other sites

OK, jplrepo looked at the code. The answer is basically that KSP is based on Unity, and Unity has an "audiolistener". And the units for "threshold" and "responsiveness" are defined inside Unity for their silly audio thing. So if you don't like the units, or you want more detail on what they mean, ask them.

"The threshold is used to check against the levels of the current audiolistener -- if the levels of the current sound being heard are above the value of the threshold, then the volume is decreased. So the higher the threshold the less the volume is decreased.

The responsiveness is used to adjust the volume based on user input. So if you change the volume the responsiveness is how fast the volume will adjust (respond)."

 

Link to comment
Share on other sites

Thanks for the insight.

I've tried to find threshold and responsiveness in the Unity documentation, but to no avail. I did find a compressor and a ducking functionality described, but all of them require a lot more parameters to be set rather than just those two, so I tentatively presume this is some functionality wrapped around the listener.

The problem to easily deduce the functionality from these sliders aren't just their missing units, it's also their ranges. A threshold of 0 might suggest that ALL signal, all the way down to silence, was affected, and a threshold of 5 (as in, 5 sources at playing at 100 % at once, theoretically) could easily be exceeded by multiple engines firing at once, or many parts crashing into water, making this threshold rather pointless. Also, where's the compression or limiting in there? Is it somehow tied to the Threshold slider?

In the end, these are but wild speculation. This isn't really a technical issue, it's usability and accessibility! These sliders are presented to a PLAYER, a PLAYER shouldn't need to try and guess their inner workings, it should be obvious and clear from their presentation alone what they do!

Edited by Andersenman
Link to comment
Share on other sites

  • 9 months later...

Another handful of updates has gone by, another handful of updates without clarification on this functionality. So once again I'd like to raise this still relevant thread from the dead and ask,

On 1/1/2017 at 11:39 AM, Andersenman said:

Dear Squad, could we please get documentation, labeling, explanation, confirmation, or anything else that makes clear, without doubt, what these sliders and their values affect, and how?

zW4d3ca.png

Thanks.

 

Kind regards,

A.

Link to comment
Share on other sites

On 1/3/2017 at 8:43 AM, bewing said:

OK, jplrepo looked at the code. The answer is basically that KSP is based on Unity, and Unity has an "audiolistener". And the units for "threshold" and "responsiveness" are defined inside Unity for their silly audio thing. So if you don't like the units, or you want more detail on what they mean, ask them.

"The threshold is used to check against the levels of the current audiolistener -- if the levels of the current sound being heard are above the value of the threshold, then the volume is decreased. So the higher the threshold the less the volume is decreased.

The responsiveness is used to adjust the volume based on user input. So if you change the volume the responsiveness is how fast the volume will adjust (respond)."

 

Didn't this answer the question nearly a year ago?

Link to comment
Share on other sites

On 10/27/2017 at 8:16 PM, Cpt Kerbalkrunch said:

Didn't this answer the question nearly a year ago?

 

On 1/3/2017 at 5:15 PM, Andersenman said:

Thanks for the insight.

I've tried to find threshold and responsiveness in the Unity documentation, but to no avail. I did find a compressor and a ducking functionality described, but all of them require a lot more parameters to be set rather than just those two, so I tentatively presume this is some functionality wrapped around the listener.

The problem to easily deduce the functionality from these sliders aren't just their missing units, it's also their ranges. A threshold of 0 might suggest that ALL signal, all the way down to silence, was affected, and a threshold of 5 (as in, 5 sources at playing at 100 % at once, theoretically) could easily be exceeded by multiple engines firing at once, or many parts crashing into water, making this threshold rather pointless. Also, where's the compression or limiting in there? Is it somehow tied to the Threshold slider?

In the end, these are but wild speculation. This isn't really a technical issue, it's usability and accessibility! These sliders are presented to a PLAYER, a PLAYER shouldn't need to try and guess their inner workings, it should be obvious and clear from their presentation alone what they do!

No.

Link to comment
Share on other sites

3 hours ago, Andersenman said:

I've tried to find threshold and responsiveness in the Unity documentation, but to no avail.

threshold: https://docs.unity3d.com/Manual/class-AudioCompressor.html

3 hours ago, Andersenman said:

In the end, these are but wild speculation. This isn't really a technical issue, it's usability and accessibility! These sliders are presented to a PLAYER, a PLAYER shouldn't need to try and guess their inner workings, it should be obvious and clear from their presentation alone what they do!

In a perfect world. All the devs can give you is the sliders. Take it or leave it.

 

Link to comment
Share on other sites

3 hours ago, bewing said:

All the devs can give you is the sliders.

Well.... given the documentation you linked to, it would seem the devs can in fact do at least one bit more: actually add units to the two in-game sliders. That tiny bit more could possible have prevented this entire thread.

After-thought: they could even add tooltips that give a short explanation of the slider effect, which would allow to explain the 'responsiveness' slider even if the actual effect of it cannot be given a fitting unit (eg. if they chose for that slider to affect both attack and release, but each of those in a different range). Tooltips are shown in the 'mini-settings', so the code for that is already in there.

Edited by swjr-swis
after-thought
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...