Hacker News new | ask | show | jobs
by janwh 2920 days ago
Interesting idea, but personally I like the Dynamic Range (DR) measurement developed by the Pleasurize Music Foundation more. It also provides a one-value output that has a direct relation to the statistics of the input audio, and AFAIK it is a somewhat established measurand in audio engineering.

Self-plug: A while back I reverse-engineered the DR algorithm and implemented it as a Python script. It's [DRmeter on GitHub](https://github.com/janw/drmeter).

1 comments

Is that similar to what replaygain uses for adjusting loudness?
TIL of ReplayGain, thanks!

From what I quickly gathered from the specs^1, Replay Gain (RG) and Dymanic Range (DR) are indeed similar in the grand scheme of things. Both algorithms employ percentile-based statistic of RMS values. While RG is determined by the 95% percentile of RMS values on 50ms audio frames, DR uses the 80% percentile on 3-second-long audio frame RMS values. So RG is definitely on the side of short-term analysis, while DR is long-term.

What differentiates RG more plainly though is its stronger psycho-acoustical foundation in regards to frequency response: It applies a so-called "Loudness filter" (modelled after the Equal-Loudness contour^2 found in human hearing) before doing the RMS statistics. The Equal-Loudness contour (also known as "Isophone" where I come from) is in turn modelled after non-linear response of the ear to sound pressure levels in relation to the frequency. It basically adjusts for what in layman's terms I'd call "Importance" of the different ranges.

Therefore I'd say RG is very much focused on what human hearing will perceive as loud (too loud, or just loud enough), while DR focuses on "exposing offenders in all ranges of the spectrum". My educated guess would be: Loud bassy sounds would not harm an RG score, while having a significant impact on the DR, as its not attenuating low frequencies.

Would be interesting to see a comparison of the two!

[1]: http://wiki.hydrogenaud.io/index.php?title=ReplayGain_specif...

[2]: https://en.wikipedia.org/wiki/Equal-loudness_contour