The software estimates how loud the sound is by using an algorithm devised by David Robinson (http://replaygain.hydrogenaudio.org/equal_loudness.html that takes into account how it sounds to a person. This way we can increase the gain on hard to hear sounds, and reduce the gain on sounds that a person is very sensitive to.

The loudness estimator, implemented in the Analysis procedure in GainAnalysis.cs, uses the following algorithm:
  1. Uses a combination of two (IIR) filters to make the sound to reflect how our ears hear it.
  2. Compute the Mean-Square value of the filtered sound (called MS)
  3. Track the last 750 ms of these values.
  4. Make a sorted copy of these.
  5. Retrieve the first non-zero value at least 95% of the way into the buffer. This is so that we don’t take the loudest sample and assume that is how the person is talking.
  6. If MS (the value computed in step 2) is much quieter, use that one instead
  7. Convert this value into dB scale by performing a logarithm on it.

To “normalize” the sound into how a person hears, the sound is first sent thru a yulewalk filter (implemented as an IIR). The output of the yulewalk filter is then fed into a 150Hz high pass filter.

Last edited May 6, 2009 at 2:32 AM by randym, version 1

Comments

No comments yet.