IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
ReplayGain and dB calculations, I'm confused about how ReplayGain library calculates the dB number
Kyopaxa
post Jan 18 2012, 23:09
Post #1





Group: Members
Posts: 2
Joined: 18-January 12
Member No.: 96536



Hi,

I've been trying to create my own implementation of ReplayGain to gather some personalized statistics over thousands of OGG files.
For that I used the source code of VorbisGain 0.37, just doing some small modifications to get the numbers I need, but now I'm totally confused about how ReplayGain calculates the audio levels. I read the wiki documentation, read a lot of articles about dBFS, dB SPL and RMS, but I am still lost with what's currently implemented in the C code of ReplayGain...

In the wiki, it states that RG tries to normalize the tracks to SMPTE-sanctioned 89 dB SPL, but in the code, the reference number used is actually 64.82:

CODE
#define PINK_REF                64.82 //298640883795                              // calibration value


Now, this is where I'm totally lost. What does this 64.82 stands for? Maybe is because ReplayGain C implementation calculates the values in a different dB scale? What scale is that?
Go to the top of the page
+Quote Post
Notat
post Jan 19 2012, 00:18
Post #2





Group: Members
Posts: 581
Joined: 17-August 09
Member No.: 72373



The 89 dB SPL is a bit difficult to explain without unspooling the whole ball of yarn. ReplayGain operates by comparing the measured loudness of an audio file with the measured loudness of a reference signal. The reference signal is pink noise at -14 dB RMS. The constant in the code represents the measured loudness of this reference. If a measured file is found to be louder than this, ReplayGain will attenuate it.
Go to the top of the page
+Quote Post
Kyopaxa
post Jan 19 2012, 01:01
Post #3





Group: Members
Posts: 2
Joined: 18-January 12
Member No.: 96536



Wow, I think I finally understood the whole thing! Thanks a lot.

So, to put this with other words:

The calibration value of 64.82 is the result of processing a -14dbFS pink noise signal with ReplayGain loudness algorithm.

I only have a question left.

Is this 64.82 still measured in dbSPL (According to SMPTE)? After all, the loudness value is the RMS value of a particular 0.05 sec chunk selected after cropping the first 5% higher level 0.05 sec chunks of the processed file, isn't it?

This post has been edited by Kyopaxa: Jan 19 2012, 01:41
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 18th April 2014 - 10:18