Showing posts with label sound editing. Show all posts
Showing posts with label sound editing. Show all posts

Saturday, March 24, 2007

Loudness War and Replay Gain Follow Up

In my Prevous Post I discussed the loudness war, and how to correct some of the distortion present in your music files, and how to bring them to the same loudness as the rest of your collect. However, I only showed how to do this with Ogg Vorbis files (*.ogg). You can also do this with your MP3's using MP3Gain.

This program, fortunately, has a GUI for those averse to the command prompt. Most of it is straight forward. You click add folder, and it automatically scans it and adds all the MP3's contained in all its sub directories. To use it, you may optionally do a track analysis first to see the varying amounts of loudness of all your files. This may take a while though, so be sure to do this before lunch or going to bed. You will only have to do this once however, so it doesn't matter if you do it now yourself, or if you let the program do it for you later. You have several options when applying the gain to your tracks. The default is track gain, which makes all your MP3's the same volume relative to each other. The other popular option is album gain, which normalizes all tracks by album, that is, all the tracks from one CD will be at the same volume relative to each other from the original recording, but the whole album will be set to a loudness relative to other albums. This is for audiophiles who want to preserve the difference in volume between tracks on a classical album for instance, where one movement might be piano, and the other forte. I'm not sure what the "constant gain" option does, so you may want to research it yourself later.

Before you go click happy and hit the "Track Gain" button, there is an important feature for you to consider. Some tracks may be marked as "clipped", due to a sound engineer pushing the loudness of a track way beyond its limits, and causing a jarring distortion known as "clipping". By default, MP3Gain may not always correct this clipping problem, or may accidentally introduce its own clipping when amplifying a track that was originally very quiet. To fix this, go under options and check "Don't clip when doing track gain". Other options to note are under Options->Tags. This allow you to optionally skip already-calculated tags or to force them to be recalculated.

Wednesday, March 21, 2007

How the Suits Stole the Life out of Music, and How You Can Steal It Back

While recently browsing wikipedia I looked up Depeche Mode's Playing the Angel, and discovered something odd in the footnotes:
The album is considered by numerous fans to be poorly mastered, relying on heavy compression to intentionally and artificially boost the output. Due to the format's inherent characteristics, vinyl versions are unaffected by the poor mastering of the CD versions.

This led me to a blog post about how the audio mastering on Playing the Angel is yet another victim of the Loudness War. What this means is that many new albums (including remasters I afraid) are purposely mastered to be as loud as possible at the expense of dynamic range, audio fidelity, and possibly introducing errors like clipping. Sure enough I listened to "Precious", and heard the telltale "popping" of clipping during beats. Sure enough, the waveform of the song looks like a wall of noise:

Wall of Noise

What does this picture mean? In layman's terms, in most recorded sound, the "green blob" should look like a fuzzy sausage, not a solid rectangle. It should be lumped mostly in the middle, with little spikes hitting near the top on bottom throughout. Sometimes (during the softer parts of the song), the sausage shape should get skinny. The spikes repesent things like beats and cymbal crashes. In the case of "Precious" every single possible microsecond has been "normalized" (cranked to 11 if you will).

Why would the suits do such a thing? Well, two reasons, really. First, louder albums make more sales. Given two heavy metal albums, would you pick the louder or quieter one? Second, "audio compression" (different from mp3 compression) makes the music consistently loud in a noisy environment or public environment (your car or the dance floor). When listening with headphones though, the distortions can become noticeable, such as every part of a song being at the same volume, the music sounding "muddy", and the clipping I mentioned earlier.

So, how can you correct this travesty? Well, fortunately, there are tools that can fix the clipping errors and alleviate some of the muddiness. The dynamic range problem can't be fixed though. The only way to fix that problem is to find a vinyl copy of your album, record it on your computer to a lossless format such was FLAC, then record it back to CD.

Here's what you can do if you have your music on CD, MP3, or Ogg Vorbis. There is a standard called Replay Gain. The wikipedia link has a number of implementations, but I will explain here how to quickly bring all your Ogg Vorbis music files back up to par. Coincidentally, this tool will also help your classical music albums sound almost as loud as your rock albums on your player, so you don't need to fiddle with your volume dial as often. It is called VorbisGain and is available on Rareware's list of ogg utilities. It's a command line utility, but don't let that scare you! Click on the download link under "VorbisGain v.0.37". Open up the zipfile. You'll see a bunch of code files, ignore those and go into the "Release" folder. There will be a single exe file. Save the exe to your windows directory (usually c:\windows). Then click Start->Run... and enter "cmd" into the box (without quotes) and hit enter. A DOS prompt will show up. Type in the following:

VorbisGain.exe -r "YourMusicDirectoryGoesHere\*.ogg"

The -r means it scan all your folders and files recursively for Ogg Vorbis. YourMusicDirectoryGoesHere is the location of your music. In my case it is g:\Music, yours will be elsewhere. Some may be thinking "Woah buddy, I'm not going to just run some dos command to garble my music!" This program will not modify the actual audio data. It will simply mark your file with a "loudness value" that will be used by your music player. Now for the last step. Most music players have a plugin to use Replay Gain. I happen to use WinAmp, and all you have to do to turn it on is to go to Options->Preferences->General Preferences->Playback, turn on "Use Replay Gain" and select "Apply Gain / Prevent Clipping" for the Amplification Mode. Other programs will differ. If your player does not have a Replay Gain feature, your files will simply play as they did before. If you don't think Replay Gain sounds good or screws something up, you can always undo your work with the -c switch:

VorbisGain.exe -r -c "YourMusicDirectoryGoesHere\*.ogg"