Normalizing using RMS as opposed to Peaks.

I have just installed Audacity 2.3.0 on my Fedora Linux Distro. I am trying to learn just what can be done with Normalization and ReplayGain and what they can sensibly do. I have many FLAC files ripped from CDs I have collected over the years. It is a diverse collection of both Rock and quieter melodies. I am using Audacity to get them to a common level without the use of ReplayGain, as the player in my vehicle, although it plays FLAC, no one is able to tell me if it can use ReplayGain adjusting, on playback, in real time. Therefore, as it is for my vehicle, I am attempting to emulate a level SPL for the listener. I have learned that using Normalizing using RMS is superior to Peak leveling, when trying to do what I want, whether one can do the entire collection at once or only by album.
So my question, is it possible to get a Plugin or something to use within Audacity which can handle RMS Normalizing? I have lots of RAM and CPU power so time to process it not of concern to me. I am a novice in understanding Digital Codecs among many other issues that are consequential in this undertaking. I none the less would like to see what can be done using Audacity. I know there are other programs out there but I am a committed FOSS(er). I also tried to make a small donation but my card supplier rejected it 3 times, so I quit trying.

This may be a good time for Chris’s Compressor. It’s a third party audio processor whose goal in life is to make it so Chris could listen to opera in the car. The default settings are pretty gentle, but I use a variation that simulates stiffer broadcast processing.

I change the first value Compress ratio from 0.5 to 0.77. Everything else is default.

The only known shortcoming is ratty processing at both ends of the show. So you can add a bit of unimportant work at both ends and then cut it off later. This never bothered me because my application show was too long and going to be cut down anyway. I just made cut-down the last step.

This problem is unlikely to be fixed because Chris reached end-of-life.

It appears under Effects as Compress Dynamics.

I used it to process the podcast version of a broadcast radio show. When broadcast, the show always went through broadcast processing and sounded perfect, so it was something of a shock the first time I got the podcast and it turned out one presenter mumbled in his socks and the other had a thermonuclear laugh. I couldn’t listen to it on headphones without sustaining medical damage.

Chris to the rescue.

This is the only processing I know of that doesn’t care whether the show is speaking or music.

Like broadcast processing.


Yes, here: RMS Normalize

This is a “Nyquist plug-in”. Installation instructions:

is it possible to get a Plugin or something to use within Audacity which can handle RMS Normalizing?

Fair warning RMS Normalize is not a “get out of jail card.” It will respond to rumble and microphone data errors you can’t hear and may create overload and clipping distortion. That’s why it’s used in the middle of a correction suite of tools and not by itself.


Hi Koz
I want to thank you for both your posts. I have installed ‘compressor’ and I am playing around with it. I also take heed of your warning in this post. I am just experimenting currently, so it might take awhile before I get proficient at this stuff. I do find that there are an infinite number of approaches but I am glad that I have your recommendations before I get underway. Very helpful. If I have some success I will post back what I have found. Cheers…

Hi Steve
Thanks for your post. I will look at the ‘RMS’ normalizing that you indicated in your post. As I mentioned to Koz, I am just experimenting at this moment and your collective help is invaluable. I will get into the weeds on this one over the next while and your help is much appreciated in getting me headed in the right direction. Thanks…

Hi Koz
I was wondering what the ’ ; ’ within the ‘compress.ny’ script/plugin actually does? I can see that ’ ;; ’ means a ‘comment follows’. I assume that it ’ ; ’ is a marker (or conditional) and all code following on the same line would be executed, possibly only in some circumstances. Can you help me understand these items? Thanks for any help…

A semicolon (:wink: indicates a comment.

The use of double, (or triple) semicolons is just a convention.
For a single “in-line” comment, a single semicolon is usually used.
Comments referring to a block of code may use double (or triple, or more) semicolons, but only the first semicolon is actually required.

In Nyquist plug-ins (which are specific to Audacity), there are some “special” comments. Because they start with a semicolon, Nyquist treats them as comments (Nyquist ignores them), but if a comment starts with one of the special key-words, and is correctly formatted, then Audacity will read the comment.

These “special comments” are usually at the top of the Nyquist file, and are listed in the documentation as “header” comments:

In Audacity 2.3.1 (alpha), a dollar character ($) can also be used as comment symbol, though this will normally be found only in plug-ins that are shipped with Audacity, and only for “header” comments. The reason for this addition is so that shipped plug-ins can be translated along with the rest of the Audacity interface. This is not yet in the documentation (Audacity 2.3.1 has not been released yet), but if you see it in the future, you’ll know what it is.

Hi Koz
I have a question about the following line in your earlier post.
You said:

“I change the first value Compress ratio from 0.5 to 0.77. Everything else is default.”

I found the first value on line 8 of ‘compress.ny’ and I set it out below:

;control compress-ratio “Compress ratio” real “” .5 -.5 1.25

Because the ’ ; ’ is in front of this line, I assume it is a Comment and not used by the plugin. I changed it to:

;control compress-ratio “Compress ratio” real “” .77 -.5 1.25

My question is: Do I have to remove the ’ ; ’ at the beginning of the line to have the parameters used or just use it as it was? (with the change to .77 from .5 of course)

I am not that familiar with ‘nyquist’ coding, I guess. Any help would be appreciated.

You don’t have to modify the code, just create preset(s) …

Create user preset on (Chris's) Compressor plugin.gif

As Trebor wrote, you don’t need to change the code.
If the code is not changed, the plug-in will remember the last settings used, and, as Trebor described, you can create user presets.

To answer your direct question…

The line:

;control compress-ratio "Compress ratio" real "" .5 -.5 1.25

is seen by Nyquist as a comment, and is ignored, but Audacity sees this line as a “header command”.

This header tells Audacity to create a slider widget in the plug-in GUI to accept floating point values. The value is assigned to a Nyquist variable: “compress-ratio”.
The three numbers at the end represent the “factory default”, minimum and maximum values. So in this case, the factory default value for “compress-ratio” is 0.5, and it can be set by the user to any value in the range 0.5 to 1.25.

The semicolon at the start is required, otherwise Nyquist will try to interpret this line and will fail (because it is not written for Nyquist and is not valid Nyquist syntax).

Hi Trebor
OK. I now understand. Thank you. When I go to the compressor app only Save presets, Factory Presets and About are actionable. The User Presets, Delete Presets, Import, Export and Options are grayed out. Is that a permissions problem or what?

Hi Steve
Got it:) Thanks again…

“Import” and “Export” presets and “Options” are not available for Nyquist effects.

“Delete” preset is not available until you have saved some user presets (the “factory default” preset cannot be deleted).
“User Presets” gives a list of the user presets, if there are any - it is greyed out if there aren’t any.

Hi Steve
I thank you again and have a great day :slight_smile:

There is a Replay Gain Plugin for Audacity. Take a look at ReplayGain plug-in
The plugin will adjust the actual audio data to get the volume right, so you won’t need a player which understands any Replay Gain tags.
The plugin is not perfect, yet better than anything that is based on RMS alone without taking human perception into account.
Just stay with the default volume setting (89 dB); it’s unlikely that you will need additional compression to avoid clipping.

Or, alternatively…

Convert the tracks to mp3 and run them them through the “mp3gain” progam. In your vehicle the superior quality of FLAC will - most likely - not be perceived, anyway. Pro: Much faster than method 1; it needs no manual interaction.

just my 2c

Hi Walter
Thank you for your post. I do have both FLAC and MP3 audio files and my search for a proper filter should work on both once, it is tuned up. I make MP3 playlist for friends who have American and/or Japanese car audio systems. Many of the German cars now have the ability to play FLAC and I am glad of that. I agree with you that having FLAC quality is not much good out on the road ( where my wife has a different idea of appropriate volume levels anyway). I tend to stay in the vehicle while my wife shops, so I get lots of opportunities to listen in a quiet environment :wink:
Anyway, I appreciate the information and I will try to look into both of the items you set out in your post. Thanks again for your information…