Main

News

Docs

FAQs

About Sound Normalization

License

Links

Download




LARS

Normalization

What is sound normalization?

In simple terms, normalization is taking a .wav file that wasn't recorded at the full volume it could be, and makes it as loud as possible without adding noise distortion.

Why add normalization to Lars?

My friends were complaining that when they recorded mp3's to CD, some of the mp3's would be louder than the others. The normalization functions should raise all the songs to their maxiumum volume so that all songs are just as loud.

How does normalization in Lars work?

I came up with this algorithm on my own, not sure if anyone does this also tho. From a physicist point of view, my algorithm is probably extremely wrong, but I really like the way it makes my sound files sound. I came up with this idea by decompressing an mp3 that was extremely quiet compared to others and writing a computer program to analyze the sound data. Sound data in a 16 bit wav file can range from -32768 to 32767. This particular wav ranged from -21044 to 21044. So I simply multiplied every sound sample in this wav by 1.557 or 32767/21044. This raised the range of the sound data to -32767 to 32767. The volume of the .wav file was much better, but still not perfect.

So next I decided to see what would happen if I raised the volume by more than a 1.557 ratio. This caused the wav file to sound a lot better, but caused clicking sounds in certain parts of the wav, so that's when I came up with the idea I'm using right now. I figured that in this sound file probably only a handful of the individual sound waves are reaching over the peak of 32767 when I set the ratio higher than 1.557, so I wrote some code that first analyzes the sound file search for a ratio that would cause about 20,000 individual waves to go over the "clean" threshold and then when it multiplies the sound samples by this ratio, if the current sound wave reaches over 32767, it will multiply it by a different ratio that will not allow it to go over 32767 (thus removing the clicking sounds).