Page 1 of 1

Any way to do a batch job to normalize many tracks?

Posted: Sun May 18, 2008 1:09 am
by Erkenfresh
Hi! First post here. I've been using Audacity for years to record music from my turntables. It's been kind, most of the time. Though occassionally the output jumps or one time it was completely corrupted (out of thousands of rips this is still pretty good). I find it to be an invaluable tool.

Now, I've gotten into buying MP3's online as well. The problem is, the tracks have widely different volumes. Even a single store doesn't seem to normalize all it's tracks to the same level. So, I'd like to normalize all of them myself. I could do this the tedious way. Open it in Audacity, select Normalize, wait..., and then Export. But, it would be so much nicer if Audacity could do all of that on a particular directory or set of files. That way I can start it, leave for a couple of hours, then voila, it's done!

That being said, I'm a code developer so I might be able to hack something together with Audacity's source code (can I build it for WIndows with gcc?). But, I'd rather not duplicate someone else's work if it's already out there.

Thanks in advance!

Re: Any way to do a batch job to normalize many tracks?

Posted: Sun May 18, 2008 4:06 am
by kozikowski
There are no batch tools in 1.2. There might be in 1.3, and it's a really good bet in 1.4 which isn't quite out yet. I think the current release candidate is 1.3.5b-III or something like that. I'll see if I can get the forum proctor's attention.

Koz

Re: Any way to do a batch job to normalize many tracks?

Posted: Sun May 18, 2008 6:35 pm
by Erkenfresh
Thanks Koz. That brings me to another question. Can I compile Audacity using gcc? I've used Cygwin before, anyone else tried compiling with it?

Re: Any way to do a batch job to normalize many tracks?

Posted: Sun May 18, 2008 8:05 pm
by Gale Andrews
kozikowski wrote:There are no batch tools in 1.2. There might be in 1.3, and it's a really good bet in 1.4 which isn't quite out yet. I think the current release candidate is 1.3.5b-III or something like that.
Koz
1.3.5 Beta is now officially out:
http://audacityteam.org/download/

and batch processing has been around since the early days of 1.3.x. So yes you can select a clutch of files in a folder, and run a batch chain to normalize them to -3dB or whatever level you like, then export them to a chosen format. An "MP3 Conversion" chain is built-in, but you can edit any chain for example to export to FLAC instead. Bear in mind:

* There may be quicker/more space efficient tools than Audacity, because Audacity will first import then decompress the files (by default to 32 bit) before normalizing and exporting, and currently won't clear the temporary files created until the whole batch is finished (this is something we should fix). If all you want to do is normalize, you may prefer for example dbPowerAmp.

* Normalizing in Audacity normalizes the channels independently, so may change the relative level of the channels in a stereo file. If you want to preserve the channel balance, use Amplify instead.

* Re-encoding pre-existing MP3s as MP3 will cause further loss of sound quality.

* Normalizing or amplifying says nothing about how loud the tracks will actually be perceived. If you want to take that into account, you need to consider replay gain solutions. Replay Gain is a standard for analysing the perceived loudness of a file and then allowing the user to set a "target" perceived volume. This target is not a target for maximum amplification, nor does it apply compression, but is a target (usually around 90 dB) for "overall perceived" volume which is similar to the RMS value. When you play a file with Replay Gain data in a media player that supports it, the audio volume will be adjusted so that the perceived volume is at the target you specified. So if you write all your audio files with Replay Gain set at the same target level, they will all sound about the same volume without you having to fiddle with the volume controls. For example you could use MP3Gain:
http://mp3gain.sourceforge.net/faq.php#start

to write the Replay Gain information into your MP3s and not use Audacity at all. The files are not re-encoded, so no further quality is lost beyond that in the original MP3 compression.

To read more on Replay Gain, see:
http://en.wikipedia.org/wiki/Replay_Gain

So the more useful feature to add to Audacity that it does not have would be replay gain support. Windows builds of Audacity are currently built with the MS Visual C++ 2005 IDE. You can also compile Audacity from the command line in the Cygwin environment using the GCC compiler, but isn't fully supported and might need some "fiddling" and expert knowledge to make it work. Please see:
http://audacity.cvs.sourceforge.net/aud ... iew=markup


Gale

Re: Any way to do a batch job to normalize many tracks?

Posted: Mon May 19, 2008 3:40 am
by Erkenfresh
Wow! Thanks for the info!