Log in

View Full Version : batch processing -> loudness matching


joco
August 4th 09, 09:50 AM
Hey guys.

There are tons of software that can do batch processing.

I'm interested where this exact batch could be done:

1. find out the RMS or loudness of the file aaa.wav
2. change volume of bbb.wav so it matches the loudness of aaa.wav

I'm most comfortable in Wavelab, is there maybe a plug-in that this
could be done with?

I have over 2k files to process, any help or direction would be
greatly appreciated.

Rok

Richard Crowley
August 4th 09, 05:51 PM
"joco" < ...
> There are tons of software that can do batch processing.
>
> I'm interested where this exact batch could be done:
>
> 1. find out the RMS or loudness of the file aaa.wav
> 2. change volume of bbb.wav so it matches the loudness of aaa.wav
>
> I'm most comfortable in Wavelab, is there maybe a plug-in that this
> could be done with?
>
> I have over 2k files to process, any help or direction would be
> greatly appreciated.

Adobe Audition has a "Group Waveform Normalize" feature.

Why not just normalize them all to some fixed point? That way
you could spread the job across multiple machines and run
them in parallel to speed the process.

Wecan do it
August 4th 09, 06:18 PM
"Richard Crowley" > wrote in message
...
> "joco" < ...
>> There are tons of software that can do batch processing.
>>
>> I'm interested where this exact batch could be done:
>>
>> 1. find out the RMS or loudness of the file aaa.wav
>> 2. change volume of bbb.wav so it matches the loudness of
>> aaa.wav
>>
>> I'm most comfortable in Wavelab, is there maybe a plug-in
>> that this
>> could be done with?
>>
>> I have over 2k files to process, any help or direction
>> would be
>> greatly appreciated.
>
> Adobe Audition has a "Group Waveform Normalize" feature.
>
> Why not just normalize them all to some fixed point? That
> way
> you could spread the job across multiple machines and run
> them in parallel to speed the process.


Normalizing is not something that compares loudness, it just
finds the peak of peaks and makes sure that peak does not go
over. How loudness is perceived by humans is no trivial
algorithm. Perhaps if one had to do this by hand the
complexity of the OP's question could be understood better.

good luck
dawg

Richard Crowley
August 4th 09, 06:20 PM
"Wecan do it" wrote ...
> Normalizing is not something that compares loudness, it just finds the
> peak of peaks and makes sure that peak does not go over. How loudness is
> perceived by humans is no trivial algorithm. Perhaps if one had to do this
> by hand the complexity of the OP's question could be understood better.

Indeed. But since we don't know the whole picture here, I'm
suggesting that there may be a simpler solution that would be
more cost/benefit effective.

Laurence Payne[_2_]
August 4th 09, 06:22 PM
On Tue, 4 Aug 2009 09:51:00 -0700, "Richard Crowley"
> wrote:

>> 1. find out the RMS or loudness of the file aaa.wav
>> 2. change volume of bbb.wav so it matches the loudness of aaa.wav
>>
>> I'm most comfortable in Wavelab, is there maybe a plug-in that this
>> could be done with?
>>
>> I have over 2k files to process, any help or direction would be
>> greatly appreciated.
>
>Adobe Audition has a "Group Waveform Normalize" feature.
>
>Why not just normalize them all to some fixed point? That way
>you could spread the job across multiple machines and run
>them in parallel to speed the process.

Because unless all the wav files were very similar in musical content
and recording technique, and had similar peak levels (even if only a
single hit in each track) normalising wouldn't get anywhere near
giving equal perceived volume.

Kompan
August 4th 09, 06:51 PM
On Aug 4, 7:22*pm, Laurence Payne > wrote:
> On Tue, 4 Aug 2009 09:51:00 -0700, "Richard Crowley"
>
> > wrote:
> >> 1. find out the RMS or loudness of the file aaa.wav
> >> 2. change volume of bbb.wav so it matches the loudness of aaa.wav
>
> >> I'm most comfortable in Wavelab, is there maybe a plug-in that this
> >> could be done with?
>
> >> I have over 2k files to process, any help or direction would be
> >> greatly appreciated.
>
> >Adobe Audition has a "Group Waveform Normalize" feature.
>
> >Why not just normalize them all to some fixed point? That way
> >you could spread the job across multiple machines and run
> >them in parallel to speed the process.
>
> Because unless all the wav files were very similar in musical content
> and *recording technique, and had similar peak levels (even if only a
> single hit in each track) normalising wouldn't get anywhere near
> giving equal perceived volume.

Hey.

Thank you guys for fast answers.
Normalizing is, as said before, not an option.
Even having the whole package in the same perceived volume is not,
since files have different volumes for a reason.

I have a guy who is making a simple tool at the moment.
He will be calculating RMS
( http://en.wikipedia.org/wiki/Root_mean_square )
and then adjusting volume to other file so that their calculated RMS
values are the same.
I'll let you know how it works.

In the mean time, since (as said before) loudness is a complicated
thing, are there any other simple "checks" that we could put in to the
RMS calculation, so that perceived volume would match as much as
possible?
(currently we're ignoring everything under 0.3%, to ignore the
silence)

Of course, suggestions on a proven piece of software or plug-in is
even better.

R

Anahata
August 4th 09, 09:18 PM
On Tue, 04 Aug 2009 01:50:58 -0700, joco wrote:

> Hey guys.
>
> There are tons of software that can do batch processing.
>
> I'm interested where this exact batch could be done:
>
> 1. find out the RMS or loudness of the file aaa.wav 2. change volume of
> bbb.wav so it matches the loudness of aaa.wav

normalize-audio almost does this.
By default it measures the RMS level of a whole file, then adjusts it all
so the new RMS level is -12dBFs

You can set any other final RMS level, and you can also run the analysis
only phase to find out what the current RMS level is, without making
changes.

Free software, available for Windows as well the expected free platforms.
See http://normalize.nongnu.org/

As the source code is freely available, it might not take much to tweak
it to do exactly what you want, if you're any good at programming or know
someone who is...

--
Anahata
-+- http://www.treewind.co.uk
Home: 01638 720444 Mob: 07976 263827

Peter Larsen[_3_]
August 4th 09, 09:57 PM
Laurence Payne wrote:

[Richard Crowleys suggestion]

>> Adobe Audition has a "Group Waveform Normalize" feature.

>> Why not just normalize them all to some fixed point? That way
>> you could spread the job across multiple machines and run
>> them in parallel to speed the process.

> Because unless all the wav files were very similar in musical content
> and recording technique, and had similar peak levels (even if only a
> single hit in each track) normalising wouldn't get anywhere near
> giving equal perceived volume.

Fortunately the group normalize in auditition compares some version of
average levels and it it does a great job of getting stuff into the same
county, even if not the same barn. And it has good merit to define a "house
standard" for average level, even if there then will be some "atypicals"
that need manual tweaking. However I'm not really sure that one can just ask
it to normalize average levels to a defined average, I think it likes to
analyze a group of files and ask you what to do with them.

Kind regards

Peter Larsen

Phil W
August 5th 09, 12:41 AM
joco wrote:
> Hey guys.
>
> There are tons of software that can do batch processing.
>
> I'm interested where this exact batch could be done:
>
> 1. find out the RMS or loudness of the file aaa.wav
> 2. change volume of bbb.wav so it matches the loudness of aaa.wav
>
> I'm most comfortable in Wavelab, is there maybe a plug-in that this
> could be done with?

Check out the "Meta Normalizer" in Wavelab. If I understand correctly, what
the manual says and what I´ve read somewhen, it might be the tool you´re
looking for.
About 10 years ago, I used an Audio-CD burning program named "Feurio!",
which also included a tool to match levels of audio files. The files were
scanned, so the level calculation could be done before or during (I don´t
know, when it was actually applied) the burning process. When I made
compilation CDs with files of different audio levels, it worked pretty well
usually. How the calculation was done in this program, is probably only
known to the author, but the result was pretty good - at least for me...


Phil

RD Jones
August 5th 09, 09:05 AM
On Aug 4, 12:51*pm, Kompan > wrote:
> On Aug 4, 7:22*pm, Laurence Payne > wrote:
>
>
>
> > On Tue, 4 Aug 2009 09:51:00 -0700, "Richard Crowley"
>
> > > wrote:
> > >> 1. find out the RMS or loudness of the file aaa.wav
> > >> 2. change volume of bbb.wav so it matches the loudness of aaa.wav
>
> > >> I'm most comfortable in Wavelab, is there maybe a plug-in that this
> > >> could be done with?
>
> > >> I have over 2k files to process, any help or direction would be
> > >> greatly appreciated.
>
> > >Adobe Audition has a "Group Waveform Normalize" feature.
>
> > >Why not just normalize them all to some fixed point? That way
> > >you could spread the job across multiple machines and run
> > >them in parallel to speed the process.
>
> > Because unless all the wav files were very similar in musical content
> > and *recording technique, and had similar peak levels (even if only a
> > single hit in each track) normalising wouldn't get anywhere near
> > giving equal perceived volume.
>
> Hey.
>
> Thank you guys for fast answers.
> Normalizing is, as said before, not an option.
> Even having the whole package in the same perceived volume is not,
> since files have different volumes for a reason.
>
> I have a guy who is making a simple tool at the moment.
> He will be calculating RMS
> (http://en.wikipedia.org/wiki/Root_mean_square)
> and then adjusting volume to other file so that their calculated RMS
> values are the same.
> I'll let you know how it works.
>
> In the mean time, since (as said before) loudness is a complicated
> thing, are there any other simple "checks" that we could put in to the
> RMS calculation, so that perceived volume would match as much as
> possible?
> (currently we're ignoring everything under 0.3%, to ignore the
> silence)
>
> Of course, suggestions on a proven piece of software or plug-in is
> even better.

This is a recipe for clipping, massive hard digital clipping.
Without calculating the peak levels, an indiscriminate application
of digital gain (it's almost always done to RAISE levels, isn't it ?)
will certainly result in peaks being pushed past 0dB.

Let me say it in no uncertain terms...
HARD DIGITAL CLIPPING IS BAD.
It is bad form, frowned upon by professionals, and to be avoided.

Sound Forge will do what you want in batch mode, but you have
to establish the rms level of "aaa.wav" first manually, then run the
"normalise using: average rms power" and select "if clipping occurs:
apply dynamic compression". You could also chain together an
rms leveling compressor and a peak limiter, but you'd still need to
supply the rms reference.

Just so we're clear here, raising rms levels without also limiting
peaks will most likely result in clipping.

rd

Kompan
August 5th 09, 11:55 AM
On Aug 5, 10:05*am, RD Jones > wrote:
> On Aug 4, 12:51*pm, Kompan > wrote:
>
>
>
> > On Aug 4, 7:22*pm, Laurence Payne > wrote:
>
> > > On Tue, 4 Aug 2009 09:51:00 -0700, "Richard Crowley"
>
> > > > wrote:
> > > >> 1. find out the RMS or loudness of the file aaa.wav
> > > >> 2. change volume of bbb.wav so it matches the loudness of aaa.wav
>
> > > >> I'm most comfortable in Wavelab, is there maybe a plug-in that this
> > > >> could be done with?
>
> > > >> I have over 2k files to process, any help or direction would be
> > > >> greatly appreciated.
>
> > > >Adobe Audition has a "Group Waveform Normalize" feature.
>
> > > >Why not just normalize them all to some fixed point? That way
> > > >you could spread the job across multiple machines and run
> > > >them in parallel to speed the process.
>
> > > Because unless all the wav files were very similar in musical content
> > > and *recording technique, and had similar peak levels (even if only a
> > > single hit in each track) normalising wouldn't get anywhere near
> > > giving equal perceived volume.
>
> > Hey.
>
> > Thank you guys for fast answers.
> > Normalizing is, as said before, not an option.
> > Even having the whole package in the same perceived volume is not,
> > since files have different volumes for a reason.
>
> > I have a guy who is making a simple tool at the moment.
> > He will be calculating RMS
> > (http://en.wikipedia.org/wiki/Root_mean_square)
> > and then adjusting volume to other file so that their calculated RMS
> > values are the same.
> > I'll let you know how it works.
>
> > In the mean time, since (as said before) loudness is a complicated
> > thing, are there any other simple "checks" that we could put in to the
> > RMS calculation, so that perceived volume would match as much as
> > possible?
> > (currently we're ignoring everything under 0.3%, to ignore the
> > silence)
>
> > Of course, suggestions on a proven piece of software or plug-in is
> > even better.
>
> This is a recipe for clipping, massive hard digital clipping.
> Without calculating the peak levels, an indiscriminate application
> of digital gain (it's almost always done to RAISE levels, isn't it ?)
> will certainly result in peaks being pushed past 0dB.
>
> Let me say it in no uncertain terms...
> HARD DIGITAL CLIPPING IS BAD.
> It is bad form, frowned upon by professionals, and to be avoided.
>
> Sound Forge will do what you want in batch mode, but you have
> to establish the rms level of "aaa.wav" first manually, then run the
> "normalise using: average rms power" and select "if clipping occurs:
> apply dynamic compression". You could also chain together an
> rms leveling compressor and a peak limiter, but you'd still need to
> supply the rms reference.
>
> Just so we're clear here, raising rms levels without also limiting
> peaks will most likely result in clipping.
>
> rd

Hey.

Thanks again for suggestions.

The tool works better than expected. Loudnesses really do match. Can't
believe how simple this was.

Unfortunately we do experience some clipping. Most of the time there
are only few samples that got a few % over every 10 seconds or so.
They're clamped to 100%. The dynamics of audio files is fortunately
pretty high.
We could probably do some sort of soft clipping, shouldn't be to hard
to calculate:
http://upload.wikimedia.org/wikipedia/commons/2/2a/Clipping_compared_to_limiting.svg
and see how it works.
Or we could just log in to a .txt file where clipping occurs and limit
peaks before running the tool.

Will check sound forge's batch processing.

Thank you all and feel free to throw in a suggestion, if you think of
one.

Mike Rivers
August 5th 09, 11:56 AM
RD Jones wrote:

> Sound Forge will do what you want in batch mode, but you have
> to establish the rms level of "aaa.wav" first manually, then run the
> "normalise using: average rms power" and select "if clipping occurs:
> apply dynamic compression".

Is there more to know about this process? When I've tried it (Sound Forge)
even on a single file, it's sounded horrible. Are establishing the RMS level
and normalizing using the RMS power two independent steps?

It seems ilke if you're going to use push-button level control, this
would be
a decent way to do it, but it's never come close to sounding usable for me.


--
If you e-mail me and it bounces, use your secret decoder ring and reach
me here:
double-m-eleven-double-zero at yahoo -- I'm really Mike Rivers
)

Peter Larsen[_3_]
August 8th 09, 04:23 AM
RD Jones wrote:

[someone asked]

>>>>> I have over 2k files to process, any help or direction would be
>>>>> greatly appreciated.

[Richard Crowley suggested]

>>>> Adobe Audition has a "Group Waveform Normalize" feature.

>>>> Why not just normalize them all to some fixed point? That way
>>>> you could spread the job across multiple machines and run
>>>> them in parallel to speed the process.

I still concur that normalizing to a target average is the way to go, but
I'm not sure which tool that will be the optimum to choose.

>>> Because unless all the wav files were very similar in musical
>>> content and recording technique, and had similar peak levels (even
>>> if only a single hit in each track) normalising wouldn't get
>>> anywhere near giving equal perceived volume.

Which is why average values by some, suitable, definition is the answer.
There will still be some freak files, something gentle with stray percussive
peaks is likely to end up too loud by that procedure.

>> Thank you guys for fast answers.
>> Normalizing is, as said before, not an option.

Allow me to humbly suggest using the wording "aligning" for this, Audition
calls it "group level normalize".

>> Even having the whole package in the same perceived volume is not,
>> since files have different volumes for a reason.

This is why I always do it manually even when aligning to a target AVG.

>> I have a guy who is making a simple tool at the moment.
>> He will be calculating RMS
>> (http://en.wikipedia.org/wiki/Root_mean_square)
>> and then adjusting volume to other file so that their calculated RMS
>> values are the same.
>> I'll let you know how it works.

It may - or may not - work better if he highpasses the data to calculate on
at 120 Hz.

[ la snippage molto]

> This is a recipe for clipping, massive hard digital clipping.

No. Do it in 32 bit and include a limiter or just include a peak check.

> Without calculating the peak levels, an indiscriminate application
> of digital gain (it's almost always done to RAISE levels, isn't it ?)
> will certainly result in peaks being pushed past 0dB.

Yes, try working with 32 bit files rather than 24 bit files, 8 bit float
above 0 dB makes life comfortable.

> Let me say it in no uncertain terms...
> HARD DIGITAL CLIPPING IS BAD.
> It is bad form, frowned upon by professionals, and to be avoided.

Get real, digital clipping is clean and therefore only moderate audible and
it is not audble if shorter than a couple of milliseconds. Anybody can and
should test how such things work and test your favorite softwares unclip
tool and what it can do and can not do, so that you know when to worry.

Also it can't be bad and frowned upon with all those gravely clipped cd's
that have overshot the muliband-processor, looks more like an industry
standard to me.

What is really really really bad is opamps that reverse polarity or do other
silly things when overdriven, included any such opamps in the input of the
converter chip. Test your equipment and find out what it does.

> Sound Forge will do what you want in batch mode, but you have
> to establish the rms level of "aaa.wav" first manually, then run the
> "normalise using: average rms power" and select "if clipping occurs:
> apply dynamic compression". You could also chain together an
> rms leveling compressor and a peak limiter, but you'd still need to
> supply the rms reference.

Ah, that's great, it is easy to come up with a target value, it is just a
statistics chore on the selected material.

> Just so we're clear here, raising rms levels without also limiting
> peaks will most likely result in clipping.

Yerp, the way to go is to convert to 32 bit file, process, convert back,
doing this on 16 bit files is not in my opinion the preferable choice. Stuff
that is to end up as mp3 should stay well out of the upper dB or dB's. Also
something that any sound engineer should test ....

> rd

Kind regards

Peter Larsen