What is the default value for "audioEvent.NormalizeGain"

Phil_P wrote on 2/12/2024, 11:03 PM

Hi there,

I recently finished a little script that has a section to normalize all events on a track.

I came across the extra setting below and could not make sense of it.

// Set normalization parameters
audioEvent.Normalize = true;

// This value can be adjusted
audioEvent.NormalizeGain = 0.0;

For example:

// Set normalization parameters
audioEvent.Normalize = true;

Will simply turn normalization on, which is the same as using the switches control in Vegas.

However, I tried various settings of this value and it didn't seem to behave as expected.

// This value can be adjusted
audioEvent.NormalizeGain = 0.0; 

I wonder if anyone knowns how to use this setting, i.e what is the default value of that when simply not using it?

I will experiment more; I should be able to figure this out really as sound engineering is really my main line of work, but I thought maybe someone who has already used this may have a clue.

 

Cheers,

 

P

Comments

zzzzzz9125 wrote on 2/13/2024, 5:05 AM

try this:

// This value can be adjusted
double i = 0.0;
audioEvent.NormalizeGain = audioEvent.RecalculateNorm() - i;

 

Last changed by zzzzzz9125 on 2/13/2024, 5:09 AM, changed a total of 2 times.

Using VEGAS Pro 22 build 248 & VEGAS Pro 21 build 208.

Information about my PC:
Brand Name: HP VICTUS Laptop
System: Windows 11.0 (64-bit) 10.00.22631
CPU: 12th Gen Intel(R) Core(TM) i7-12700H
GPU: NVIDIA GeForce RTX 3050 Laptop GPU
GPU Driver: NVIDIA Studio Driver 560.70

Phil_P wrote on 2/13/2024, 5:55 AM

try this:

// This value can be adjusted
double i = 0.0;
audioEvent.NormalizeGain = audioEvent.RecalculateNorm() - i;

 

Hi, thanks I am not seeing any difference between doing that and just doing what I already had:

I used this in my code as I already have double "i"
 

// Set normalization parameters
double ng = 0.0;
audioEvent.NormalizeGain = audioEvent.RecalculateNorm() - ng;
audioEvent.Normalize = true;


Previously it was just:
 

audioEvent.Normalize = true;

 

Ahh thinking about it I am guessing that 0.0 is just the same as def and can be adjusted further if required. I will keep at it thanks again.

Phil_P wrote on 2/13/2024, 6:20 AM

So I have added the variable to my settings file:
for example the value of "normalizationOffset" can be 3.0 or 10.0 etc.
 

Normalization=5.0
// Get the audio event AudioEvent audioEvent = (AudioEvent)trackEvent;
// Set normalization parameters
audioEvent.NormalizeGain = audioEvent.RecalculateNorm() - normalizationOffset;
audioEvent.Normalize = true;

But I am not seeing any difference when I change that figure.

Phil_P wrote on 2/13/2024, 7:01 AM

Ok the lines have to be in this order:
 

audioEvent.Normalize = true;
audioEvent.NormalizeGain = audioEvent.RecalculateNorm() - normalizationOffset;