How to Increase Sound Levels of mp3 Music Files Without Clipping?

First post here. Please be gentle. Windows 7, Audacity v 2.0.
After searching for quite a bit I couldn’t find a comprehensive answer to my question so here goes…

I’ve got a new truck (2018 Ram 1500 with UConnect 8.4 audio system) that has a USB port for playing music stored on USB flash drives. The truck’s audio system has the ability to execute voice commands to play music, i.e. “Play song ‘Stairway to Heaven’” or 'Play album ‘Led Zepplin IV’. I’m in the process of ripping a bunch of my CD’s using Windows Media Player into lossless WAV files, then importing the songs into Audacity. When I have the WAV files in Audacity I use the function Effect > Amplify to bring the sound level of each song to the maximum allowed sound level without clipping. Apparently it’s the default setting of the Amplify function and it brings the peak amplitude to 0.0 db. I then convert to mp3 files at 320 kbps, export the song to my PC, and finally copy them on a USB stick so I can play the songs in my truck.

I’ve found when I play the mp3 files I have to turn the volume up in my truck to higher than usual levels to reach the desired volume level. For example, I might listen to music on the radio at a volume setting of 16 but to get an mp3 song from the USB stick to play at the same perceived loudness level I have to turn the volume up to 26, for example. (Volume control goes up from 1 to 39)

I’ve gone back into Audacity and repeated the process but this time applied the Amplify function to more than 0.0 db levels. For example, I might set the ceiling at +0.5 db, checkmark the box “allow clipping”, and then depending on the song I might see a few vertical red lines here and there or I might see a LOT of red lines, so much that it practically obscures the blue waveforms underneath. I tend to be a bit afraid of the red vertical clipping indicator lines so I will set the levels just a bit higher than 0.0 db, say 0.3 db, which produces maybe 10-15 “red clipping lines.” However when I export the file and then play it in the truck it is a bit louder but I might still have to set the volume to 22 or so. Except for the elevated volume setting the song sounds fine but I swear I’m hearing distortion when I crank up the volume to, say 30 or so. (Or am I imagining that distortion?)

Is there a solution for this? How can I get my mp3 files from ripped CD’s to play louder in my truck’s audio system at the same volume setting as the radio? Can I set the Amplify function to higher levels and not get distortion? Or, to put it another way, how much red is tolerable in the waveform when using the Amplify function?

Side issue–When I purchase mp3 songs and albums from Google Play Music, they play louder in my truck than ripped CD’s converted to mp3 files, but when I import these songs into Audacity and look at the waveform, it’s almost solid red! What’s going on with that?

The problem is caused by the loudness war.

One workaround for the problem is to use ReplayGain or Sound Check (Apple version of ReplayGain).
ReplayGain allows players that support it, to automatically adjust the playback level to achieve similar loudness. It does this by analyzing the tracks and adding special metadata tags that tell the player how much to adjust the playback volume to achieve “normal” loudness. This process is “non-destructive” in that it makes no changes to the audio data - it just adds a bit of metadata.

If your player supports ReplayGain, you can add ReplayGain tags to all of your MP3 files using Foobar2000.
If your player support Sound Check, you can add Sound Check tags to all of your MP3s using iTunes.

Amplifying over 0 dB causes “clipping” (the peaks of the waveform are clipped off), which can cause a nasty crunchy sound to the loud bits, and a huge increase in very high frequencies that may cause damage or destroy speakers - Not recommended.

If your player does not support ReplayGain or Sound Check, you could use MP3Gain to amplify each of your MP3s to the same loudness.

Is there a solution for this? How can I get my mp3 files from ripped CD’s to play louder in my truck’s audio system at the same volume setting as the radio?

You could try Chris’s Compressor. He intentionally wrote it so he could listen to opera in the noisy car.

Opera features very wide variations in performance volume. Chris boosts low volume passages and also increases overall volume.

When I use it, I increase the first setting, Compress Ratio, from the default 0.5 to 0.77 and the work compares favorably to a local radio station. Leave the other values alone.

Note that in use, the tool appears as “Compress Dynamics.” It doesn’t mention Chris.

Also note there is a mini-bug. Chris is a look-ahead compressor and doesn’t like falling off the end of the show. Make sure there is some unimportant work past the end that you can cut off later. I’ve never run into this bug, but other people have.

The bug isn’t likely to be fixed as Chris reached end-of-life.

Koz

I’ve found when I play the mp3 files I have to turn the volume up in my truck to higher than usual levels to reach the desired volume level.

Note that ReplayGain or MP3Gain will make the loud songs quieter. Since many quiet-sounding songs are already 0dB normalized/maximized the only way to match volume (without non-linear processing) is to choose a lower target-volume and lower the loud songs.

You might want a bigger amplifier in your truck. It’s always possible to crank-up the analog side… If you play a “quiet” MP3 through the Rolling Stones stadium PA it will be plenty loud! :wink:

Is there a solution for this? How can I get my mp3 files from ripped CD’s to play louder in my truck’s audio system at the same volume setting as the radio?

Radio stations use dynamic compression* (non-linear processing) so they can be louder than every other radio station (loudness war).

Compression and limiting (limiting is a special kind of compression) make the quiet parts louder and/or the loud parts quieter. In general it’s used to make “everything loud”. Clipping is also a (nasty) kind of compression.

Of course, this affects the “character” of the sound, and to me modern constantly-loud loudness-war music is boring and it makes me want to turn-down the volume. But, that’s what’s popular and that’s what sells.

You can’t expect to get the same results as a professional mastering engineer. If you have older recordings and you try to match the loudness of modern CDs you’ll probably do more damage compared to what a pro could do.

However, you may be able to match what radio stations do because their processing is automatic… There’s not a human listening and carefully tweaking the compressor.

Side issue–When I purchase mp3 songs and albums from Google Play Music, they play louder in my truck than ripped CD’s converted to mp3 files, but when I import these songs into Audacity and look at the waveform, it’s almost solid red! What’s going on with that?

If you ripped the same-exact album you’d probably get the same results.

As you probably know, MP3 is lossy compression. Some peaks get higher and others get lower (without affecting perceived loudness). If you normalize (or Amplify) to 0dB, export to MP3, and then re-open the MP3, you’ll often “see red”. The more compressed the original file was, the more red you’ll get. Some people normalize to -1dB or so before compressing to MP3.

And, some CDs are clipped… One of the tricks to winning the loudness war…

Now… Here’s where things get “interesting”… MP3 can go over 0dB without clipping. Audacity is showing potential clipping. Your DAC (digital to analog converter) is hard-limited to 0dB, so if you play the file at “full digital volume” you’ll clip your DAC. (As far as I know, any slight-clipping caused by MP3 compression isn’t audible.) If you play the file on your computer and the Windows volume control isn’t at 100%, you probably are not clipping. But in your truck, the volume control might be on the analog-side of the DAC so turning-down the volume may not prevent clipping.

DACs (playback), ADCs (recording), CDs, and “regular” WAV files are all limited to 0dB. Audacity uses floating-point internally, so Audacity can go over 0dB without clipping (but it will show red for potential clipping), and floating-point WAV files can go over 0dB.

i.e. “Play song 'Stairway to Heaven”

Stairway To Heaven is a “quiet song” and it’s dynamic (with quiet and loud parts). It’s never going to sound like an average Led Zeppelin song.





***** Don’t confuse dynamic compression with file compression like MP3. MP3 doesn’t affect the dynamics of the sound.

Thank you for this information but I don’t think these fixes are applicable to my problem. I need to raise the levels of all portions of my ripped mp3 files. These programs will “normalize” them all to a particular db level.

I downloaded Mp3Gain and ran some of my songs through the Track Analysis function. I was careful to pick songs that were not overdriven by the Amplify function of Audacity, that is, these were songs that I used the Amplify function on its default setting which is supposed to bring the peak amplitude to 0.0 db and not allow clipping.

I left the Mp3Gain setting for Target Normal Volume Level at the default setting of 89.0 db. I loaded some songs into Mp3Gain and then clicked on Track Analysis. Every song was showing a volume level in the range of -97db to -98db range. The column in Mp3Gain indicating clipping were all checkmarked with a red Y, for yes. So if I were to run Mp3Gain on these files it would LOWER the volume to -89 db, but yes, they would all be the same volume.

As I understand it, a compressor program will boost lower volume passages to “normalize” the volume levels with the overall song volume level. I don’t think this is what I’m trying to accomplish. It’s a moot point though, because I’m unable to extract the compress.ny file to my Audacity/plugins folder.

a compressor program will boost lower volume passages to “normalize” the volume levels with the overall song volume level.

Normally yes. This processor, however, was designed for a different goal. Bring up the quiet parts and make everything denser and louder. It’s a broadcast processor, not an ordinary compressor.

Attached is my copy of Chris v1.2.6.

compress.ny (16.9 KB)
Are you able to install any third party effects?

Koz

As I understand it, a compressor program will boost lower volume passages to “normalize” the volume levels with the overall song volume level. I don’t think this is what I’m trying to accomplish.

“Loudness” is complicated but density or intensity are good ways to think about it. Loudness is related the short-term average (or RMS) and the frequency content. Our ears are most-sensitive to mid-frequencies and ReplayGain and MP3Gain take this into-account.

An automatic volume control is slow-compression. A limiter is fast-compression, just pushing-down the peaks of the waveform. Limiters and automatic volume control (sometimes called “leveling”) are usually separate plug-ins. But if you but a hardware compressor, it’s often sold as a “compressor-limiter”.

Most compressors turn-down the peaks/louder parts and then make-up gain is applied to bring-up the overall-average volume so compression makes it louder.

Chris’s compressor is “different” (and there are lots of different compressors) but typically a compressor has 5 settings -

Ratio (the amount of compression)
Threshold (compression kicks-in above the threshold and has no effect below the threshold)
Attack (the speed at-which it kicks-in after the threshold is passsed)
Release (the time it takes to return to normal)
Make-up gain.

…You might try the [u]Limiter[/u] (set to hard-limit with make-up gain). I don’t have a lot of experience with it (because I like dynamics) but it seems to work very well and I’ll bet you can boost the volume by 3 to 6dB, or maybe more without damaging the sound too much.

Thanks for the plugin. I’ve installed it and enabled it. I’m going to play around with it a bit.

Ha ha! Yeah, for sure on the Rolling Stones system sounding loud with a “quiet” mp3.

The truck is leased so I don’t want to fool around with other additional amps.




Yes, good point. I don’t think I have any CD’s that are newer than 2002 or thereabouts. Every CD I’ve ripped so far is from the 90’s and they don’t show clipping in Audacity.

Now… Here’s where things get “interesting”… > MP3 can go over 0dB without clipping. > Audacity is showing > potential > clipping. Your DAC (digital to analog converter) is hard-limited to 0dB, so if you play the file at “full digital volume” > you’ll clip your DAC. > (As far as I know, any slight-clipping caused by MP3 compression isn’t audible.)

Yes, I’ve noticed I can overdrive the levels by 0.3, 0.4, or 0.5 db which increases the volume and not have any degradation in sound quality (that I can discern.)

Bad example. I’m not trying to convert that album but I thought I’d use a title that was universally recognized.

Bonus Question: Should I use Windows Media Player to rip my CD’s to lossless WAV files and then load into Audacity, make adjustments and export as an mp3 file? Or is it OK to have WMP rip the CD’s to mp3’s, then load into Audacity?

FWIW, I did a song using both methods. Then I used the Audacity function “Plot Spectrum” and looked at the chart. It seems the lossless WAV file’s frequency response out past 16Khz or so is flatter, whereas the file that was converted to mp3 by WMP before adjusting in Audacity rolls off a tad bit sooner and has more jags in the frequency response at higher frequencies.

This is three examples of Chris.

No processing
0.5 Default Compress ratio
0.77 Stiffer Compress ratio.

The sound is louder and denser without any obvious damage.

Koz