|
From: Sergei S. <ser...@ya...> - 2012-12-13 11:30:25
|
----- Original Message ----- > From: Fmiser <fm...@gm...> > To: sox...@li... > Cc: > Sent: Thursday, December 13, 2012 3:35 AM > Subject: Re: [SoX-users] Fwd: Using sox to normalize rms and peak > >> Francesco Danieli wrote: > >> Hi we are trying to use sox to normalize a bunch of audio >> files to a constant peak and RMS level. >> >> Ideally sox filename -e stats should read >> >> Pk lev dB Overall 0 >> RMS lev dB Overall -9 >> >> for all our files. >> >> We managed to obtain the first value with -n option. >> What we are missing is how to get RMS level of the files to >> the desired db,leaving Pk level untouched. >> >> We tried "gain -ne" and "gain -nb" but they both vary > the Pk >> level. We also tried loudness option but it does not give us >> what we are looking for. > > The difference between RMS and peak level is called "crest > factor". It cannot be change by changing the gain. The only > way to change the crest factor is with a limiter, compressor, > expander, or gate. These tools can change the dynamic range and > thus the crest factor. > > But what you are asking is an odd request - so I'm now really > curious _why_ you want normalize both peak and RMS. > > -- Philip > "The only way to change the crest factor is with a limiter, compressor, expander, or gate." - not exactly. All-pass filter can change it too. But I am not aware a bullet-proof recipe. I.e. the filter, depending on what it is and on input signal is can both increase and a decrease crest factor. Tu understand my statement try to visualize a signal consisting of, say, fundamental and second harmonic: f(t) = A1 * sin(w * t) + A2 * sin(2 * w * t + phi) . If phi = 0, then peak amplitude will be A1 + A2, i.e. peaks of the two harmonics with coincide with the 1/W period. Making phi non zero can decrease the peak amplitude because for, say, phi = pi/4 the peaks never coincide. Regards. Sergei. |