Skip to main content
Topic: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB (Read 751 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

When I scan files with ReplayGain for their Track Gain (including True Peak levels with 4 times oversampling, as set in in Preferences - Tools - ReplayGain Scanner), I get the results you can see at the bottom of the pic. The Track Peak column on the far right gives both a value between 0 and 1, as well as the actual True Peak level in dBTP in brackets to the right. I update the file tags, no problem so far.

In the Playlist, I have a custom column labelled TP, which I want to display the True Peak levels in dB. This is the string I am currently using to do so:

%replaygain_track_peak%

However, the value it returns is the value between 0 and 1, as you can see from the picture. It's the same value as the first number in the Track Peak column of the scan results.

So, to cut a long story short, how do I get FB to display the second TP number in dBTP instead? What string would I need to use?

Thanks in advance for any help!

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #1
Good request. The floating point values are hard to interpret outside of few memorized values like 0.50, 0.707. I'd also like a display in decibels for the difference level in foo_bitcompare. I don't think the conversion is doable with a title formatting string as that would involve a power function.

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #2
Thanks!

Yeah, I asked this recently in an unrelated thread, and didn't get any replies, so thought it deserved its own one.

My programming chops are non-existent, TBH even the simple strings scare me... ;) But my reasoning is, I mean the value is actually there, right now, within FB2k itself, and so it should just be a matter of being able to copy it over into the playlist field, right?

I'm a mastering engineer, and when I've mastered all of the tracks individually, it's fantastic to be able to load them all into FB2K for the final album listen through/QC, with the LUFS integrated and TP levels right there in front of me (after RPGain scanning, of course).

The programmability of FB is one of its best points, but not being a programmer sometimes means I require help from the (fantastic) community in order to get it to do exactly what I want it to do. :)

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #3
I don't think the conversion is doable with a title formatting string as that would involve a power function.
Maybe it is doable with JScript panel?

 

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #4
I remember when almost everyone I knew was listening to MP3s at wildly varying volumes while peak normalising their soundtrack audio, but whenever I could I'd try to share the joy of ReplayGain. Now the world's gone mad over EBU-R128 though, and loudness units are everywhere, is referring a target volume of 89dB starting to feel a little silly or is it just me?

Not so long ago I was explaining to a poster in a video forum, how to convert/adjust soundtrack audio to -23LUFS with fb2k. He was fairly familiar with fb2k so I was able to explain the process in ReplayGain-speak after providing a quick ReplayGain to LU translation. Someone still came along and told me off for not explaining it according the EBU standard.

I'll confess I don't get it. I understand the need for backwards compatibility. There must be at least five MP3 players on the market capable of reading ReplayGain tags. The data written to tags is one thing though. Couldn't fb2k display volume in both formats while ReplayGain fades away? It seems virtually inevitable to me.

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #5
For me it comes down to the fact that loudness standards and metering have been adopted by the film and broadcast industries (and to a lesser, but growing extent, audio engineers), and it is a far better gauge of perceived loudness than VU, peak, RMS or so called "DR" figures ever were. So while it might seem like a fad, for me it's actually a much more useful measurement, as I am balancing the track to track loudness on albums on a daily basis.

Being able to see the LUFS integrated figures for tracks in the FB playlist is great (I could finally ditch that horrible, buggy DR component), and being able to see the over-sampled TP level in dB would just be the icing on the cake. ;)

So is it possible?

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #6
I remember when almost everyone I knew was listening to MP3s at wildly varying volumes while peak normalising their soundtrack audio, but whenever I could I'd try to share the joy of ReplayGain. Now the world's gone mad over EBU-R128 though, and loudness units are everywhere, is referring a target volume of 89dB starting to feel a little silly or is it just me?
This reminds me of a recent thread where someone created a custom column that showed the ReplayGain track peak in terms of LUFS, but I can't seem to find it at the moment.

Edit: Never mind. I was thinking of darkflame23's other thread that covered ReplayGain adjustment in terms of LUFS. I second his desire to see the "true peak" value in similar terms.

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #7
Yes, guilty as charged!

My request had nothing to do with ReplayGain or adjustment for listening (although I do use that when I make a dinner party playlist), I just wanted the pure Integrated LUFS value readout in the playlist. As ReplayGain now uses LUFS to work out its values, it was possible to derive the figure from the ReplayGain one. Some very kind souls helped me out there!


Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #9
Thanks to a good friend, I was pointed in this direction. This is the calculation needed to convert the 0-1 values into dB:

linear-to-db(x) = log(x) * 20

See here:

http://www.playdotsound.com/portfolio-item/decibel-db-to-float-value-calculator-making-sense-of-linear-values-in-audio-tools/

But I understand power functions are needed to do that, in which case it's impossible to implement via the regular FB2K title formatting strings, right?

Off to research whatever JScript Panel is...

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #10
But I understand power functions are needed to do that, in which case it's impossible to implement via the regular FB2K title formatting strings, right?

What accuracy do you need, really? I mean, the -1.5 dB to -0.5 dB interval - which you possibly could round-off to "-1" dB? - is 0.84something  to 0.94something.
Above you had a -1.12, so I take it that integers are not satisfactory. But are integers good enough if it is beyond ... -6 dB?

(fb2k can calculate powers: $mul(3,3,3,3) gives you 3^4=81. But it requires integers. And rescaling to integers and doing high powers before downscaling ... overflow. So it has to be coded a bit carefully.)


Off to research whatever JScript Panel is...

Good idea ... thread: https://hydrogenaud.io/index.php/topic,110499.450.html
“It sounded bad to me. Digital. They have digital. What is digital? And it’s very complicated, you have to be Albert Einstein to figure it out.”
- Donald Trump, May 2017

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #11
Accuracy for True Peak readings I'd like to two decimal places, e.g. -1.23 dBTP but that's not the concern. The concern is I can't get a RG TP readout in the playlist in dB, only as a meaningless (to me, an audio engineer), number between zero and one.

Will check link, thanks!

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #12
I need to correct myself. The function needed is log(). I was thinking of conversion in the opposite direction from db to float. It probably makes more sense for Foobar to provide a pair of new technical info %__fields% than to add generic floating point functions, which don't work in older versions and have the other arithmetic operations confusingly still limited to integers.

The Play Dot Sound site makes a good case for decibels. I don't remember why the current tag format was chosen. The gain could have been a straight multiplier too. Maybe the extra digits near fullscale are helpful when doing EAC-style peak level comparisons to determine likely identical masterings. But as the float values get smaller, they are increasignly hard to visualize (in the bitcompare tool the difference values are always small).

I'll confess I don't get it. I understand the need for backwards compatibility. There must be at least five MP3 players on the market capable of reading ReplayGain tags. The data written to tags is one thing though. Couldn't fb2k display volume in both formats while ReplayGain fades away? It seems virtually inevitable to me.
The peak level statistic isn't really related to loudness normalization, except in the name chosen in Vorbis/Ape. The player can derive the required format regardless how it is encoded in the particular format. Renaming the tags serves no purpose. I prefer that the original loudness normalization standard remains.

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #13
The peak level statistic isn't really related to loudness normalization, except in the name chosen in Vorbis/Ape. The player can derive the required format regardless how it is encoded in the particular format. Renaming the tags serves no purpose. I prefer that the original loudness normalization standard remains.

I wasn't suggesting the tags should be renamed, although I'm boldly assuming there's a method for saving R128 volume information to tags using fields that have nothing to do with ReplayGain. If so, why not do both?

foobar2000 can write SoundCheck tags. I don't know if they include a peak loudness value or if it'd be easier to convert to a True Peak LUFS value for fb2k to display, but Opus decided to do it differently and that's supported by fb2k too, so between ReplayGain, SoundCheck, Opus and R128, the concept of a "universal" volume system is looking a little messy.
ReplayGain is the only method not using loudness units as a way to express volume, but considering fb2k no longer uses the original ReplayGain scanning method and supports True Peak scanning, even if the format for saving ReplayGain tags remains unchained for eternity, I'm not sure why moving to loudness units in the GUI isn't a good idea.

In fact fb2k's advanced options for configuring SoundCheck tags allows the SoundCheck target volume to be adjusted to match the ReplayGain target volume, and both volumes are expressed as loudness units, no doubt because choosing between a target volume of -16LUFS and 89dB would meaningless to most mortals, which is pretty much the point I was trying to make.

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #14
It probably makes more sense for Foobar to provide a pair of new technical info %__fields% than to add generic floating point functions, which don't work in older versions and have the other arithmetic operations confusingly still limited to integers.

That would be my preferred way of dealing with it, perhaps something like %replaygain_track_peak_db% or something?

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #15
From the 1.4.1 beta change log:

"Added title formatting fields for showing track/album peaks as decibel values."

Thanks for adding this! But where can I find which string to use to get that value? It doesn't seem to be either in the "Columns" drop down menu list, or the Foobar2000 Title Formatting Reference web page.

Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #16
It's in the titleformat help bundled with the player. %replaygain_track_peak_db% and %replaygain_album_peak_db%.


Re: [Request] View ReplayGain Track Gain True Peak Levels in Playlist as dB

Reply #18
But where can I find which string to use to get that value? It doesn't seem to be either in the "Columns" drop down menu list, or the Foobar2000 Title Formatting Reference web page.
I’ve taken the liberty of adding these new fields to the wiki page. 😊


 
SimplePortal 1.0.0 RC1 © 2008-2018