Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Do I need TRUE PEAK in Replay Gain? (Read 1765 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Do I need TRUE PEAK in Replay Gain?

Hi folks,

Recently, I've seen this new option in dBpoweramp, for the Replay Gain settings.

True Peak.
1x - no true peak
2x oversampling
4x oversamping
8x oversampling
16x oversamping

The material I have is only from CD, 16-bit, 44.100 Hz.
Usually, what will upsample the material on playback is my living room DAC (Apple TV), to 48 kHz and my soundcard, also to 48 kHz. Android/Poweramp will also upsample to 48 kHz.

When I am making new rips with this setting, I notice that the RG scanning takes a bit longer. I understand that this setting is only useful for software that can understand the "Track Peak" tag and "Album Peak" tag, as the RG values for correction are the same between the setting of 1x (no true peak) and 16x. Is that right?

Many albums I have are from the 80's so, when they have levelled RG, they will peak naturally. And the oversampling to 48 kHz is also happening.

Do I need true peak, and if so, what setting for CD material under the above circunstances?

Thanks!

Re: Do I need TRUE PEAK in Replay Gain?

Reply #1
I use it to calculate dynamic range in a collumn with foobar2000.
And so, with digital, computer was put into place, and all the IT that came with it.

Re: Do I need TRUE PEAK in Replay Gain?

Reply #2
the RG values for correction are the same between the setting of 1x (no true peak) and 16x. Is that right?
Yes. The player just looks at the REPLAYGAIN_TRACK_PEAK and REPLAYGAIN_ALBUM_PEAK values and doesn't care how they were produced.
It's possible to make software that would store and read "peak" and "true peak" as separate tags, but I've never heard of any that do.

Do I need true peak, and if so, what setting for CD material under the above circunstances?
Whether you need and how badly you need TP data is debatable. The possibility of audible clipping from intersample overshoots is very small, but it does exist.
Then there's the question of how to generate the TP values. If you wanted to be really thorough, you'd examine the behavior of the software resamplers (which resample to 48 kHz) and of the DACs of every device and then generate the TP values accordingly. But that's kinda extreme.
My simple suggestion is to scan for TPs at 4x with the default settings and then add two dBs of headroom during playback.

Re: Do I need TRUE PEAK in Replay Gain?

Reply #3
and then add two dBs of headroom during playback.
I.e., don't run the volume slider to max. The digital one before the DA conversion. (If the DAC device has one ... is it before or after conversion? You can check - and then you would likely find out whether it has half a bit of headroom too, several modern ones do have.)

Be warned that some players have a volume control that goes past full. VLC goes to "125" percent, whatever that is.

 

Re: Do I need TRUE PEAK in Replay Gain?

Reply #4
Quote
Yes. The player just looks at the REPLAYGAIN_TRACK_PEAK and REPLAYGAIN_ALBUM_PEAK values and doesn't care how they were produced. It's possible to make software that would store and read "peak" and "true peak" as separate tags, but I've never heard of any that do.

So if the player does not understand these tags, there is no practical use for them, being 1x or 16x... I believe there is no such player yet... but the true peak would anyways make sense being in the peak tag.

Quote
Whether you need and how badly you need TP data is debatable. The possibility of audible clipping from intersample overshoots is very small, but it does exist.

Never heard one in music.

Quote
Then there's the question of how to generate the TP values. If you wanted to be really thorough, you'd examine the behavior of the software resamplers (which resample to 48 kHz) and of the DACs of every device and then generate the TP values accordingly. But that's kinda extreme.

Yes, to the point of deeming the entire thing cumbersome to deal with.

I would believe 1x no true peak is fine then, considering most hardware players do not support Replay Gain and most software can't discern this.


Re: Do I need TRUE PEAK in Replay Gain?

Reply #5
I would believe 1x no true peak is fine then, considering most hardware players do not support Replay Gain and most software can't discern this.
I'm not sure I understand, most software players can't discern what?

Re: Do I need TRUE PEAK in Replay Gain?

Reply #6
I understand that this setting is only useful for software that can understand the "Track Peak" tag and "Album Peak" tag
Right.

Quote
as the RG values for correction are the same between the setting of 1x (no true peak) and 16x. Is that right?
If a player does not understand the tags, there will be no correction during playback. It is not players don't understand the tags will use 1x correction. There are cases that lossy and floating point audio formats inherently having 0dBFS+ peak levels even without any resampling, so even 1x peak scan can mitigate this type of clipping.

Never heard one in music.
https://www.audiosciencereview.com/forum/index.php?threads/lets-develop-an-asr-inter-sample-test-procedure-for-dacs.49050/post-1763519
The link above is a track release on CD. Read the subsequent replies you can see two members provided ABX results that they can hear intersample overs with this file. Of course, it is perfectly fine if you can't hear the difference, but someone can hear it.

Re: Do I need TRUE PEAK in Replay Gain?

Reply #7
Few years ago, when true peak scanning was introduced to foobar2000, I used it on one of my compilations, where I would put a lot of songs in one folder and scan them with RG, so I can use track gain on mobile player. Most of the time it worked OK, but there was one song that was noticeably quieter that the others. It was FLAC, track peak was over +2 dB, and RG would quiet it down accordingly. I've rescanned them with standard settings, no problems whatsoever.

So, YMMV with it. I don't use it anymore.
TAPE LOADING ERROR

Re: Do I need TRUE PEAK in Replay Gain?

Reply #8
So if the player does not understand these tags, there is no practical use for them, being 1x or 16x...
I would believe 1x no true peak is fine then, considering most hardware players do not support Replay Gain and most software can't discern this.
Just to avoid misunderstanding, because my previous post was a bit misleading: the ReplayGain TRACK_PEAK and ALBUM_PEAK values are going to be different depending on whether you scan the files at 1x or at 16x. So the volume is going to be attenuated by different amounts with 1x vs 16x.
(I just wanted to mention the lack of separate 'peak' and 'true peak' tags in the standard RG implementations, but that's more of an aside.)

I still recommend scanning at like 4x by default, because it's cheap/fast enough and it might catch something. Oversampling above 4x results in diminishing returns as far as true peak accuracy is concerned.

But if you want to stick with 1x and still play it safe, you can add more headroom aka lower the volume instead. As Porcus said, this needs to happen in the digital domain, before it reaches the DAC. Actually even before the software/OS resampling (depending on the implementation), so it's best to do it in the media player.

Re: Do I need TRUE PEAK in Replay Gain?

Reply #9
Most of the time it worked OK, but there was one song that was noticeably quieter that the others. It was FLAC, track peak was over +2 dB, and RG would quiet it down accordingly. I've rescanned them with standard settings, no problems whatsoever.

Now you got the "problem" that it actually overshoots, if the DAC oversamples.
If you got a digital volume control and don't play at full volume, the "problem" isn't going to be a problem, so you don't need to try to solve it.

There is, by the way, no limit to how much a "true peak" could overshoot. https://hydrogenaud.io/index.php/topic,124977.0.html
(That doesn't say there is no limit to how much of an overshoot could be audible.)

Re: Do I need TRUE PEAK in Replay Gain?

Reply #10
Fun observation: Benchmark DACs are well known to have 3.5dB of intersample headroom. However it seems that the process to provide this headroom is done on 24-bit precision without using dither. While I don't think it is an audible concern, for product selling at this price it looks a bit crude to me.

https://www.stereophile.com/content/benchmark-dac2-hgc-da-processorheadphone-amplifier-measurements
X

https://www.stereophile.com/content/benchmark-dac3-hgc-da-preamplifier-headphone-amplifier-measurements
X

For example, other products using similar ESS DAC chips don't have such artifacts in this particular measurement:
https://www.stereophile.com/content/okto-dac8-stereo-da-processor-measurements
https://www.stereophile.com/content/okto-research-dac8-pro-da-processor-measurements

Other Benchmark DAC measurements for reference:
https://goldensound.audio/2022/04/06/benchmark-dac3-b-measurements/
https://www.audiosciencereview.com/forum/index.php?threads/review-and-measurements-of-benchmark-dac3.3545/

Re: Do I need TRUE PEAK in Replay Gain?

Reply #11
I swear to God I could lecture precise details on STP, OSPF and BGP here... but I really do need audio education. I can't grasp most of the terminology (headroom, dither, etc). Although I have a very shallow understanding of what it's being discussed, I have some difficulty in "visualizing" the whole thing. I guess that the recommendation of 4x is a "no brainer" then? That's what I need... a no brainer setting. I took a look at those chiptune samples in that other forum, but I did not notice anything between the clipping sample and the treated sample.

Re: Do I need TRUE PEAK in Replay Gain?

Reply #12
Going up from 1x (and further up from 4x) slows down the scanning. Apart from that, it isn't harmful.

The peak figure will usually not be active if your player is set to employ the gain figure. (That is: employ the gain tag, but further limit the volume if the peak tag is too high.)
Because, the gain is usually so negative that it will take out a few dB overs. And it is possible to search the library for those which have an album gain of > -4 dB or whatever, and scan only those for true peak, to see if the it changes anything of interest.

Re: Do I need TRUE PEAK in Replay Gain?

Reply #13
I swear to God I could lecture precise details on STP, OSPF and BGP here... but I really do need audio education. I can't grasp most of the terminology (headroom, dither, etc). Although I have a very shallow understanding of what it's being discussed, I have some difficulty in "visualizing" the whole thing. I guess that the recommendation of 4x is a "no brainer" then? That's what I need... a no brainer setting. I took a look at those chiptune samples in that other forum, but I did not notice anything between the clipping sample and the treated sample.
4x is what the ITU recommends and that's probably how most true peak values out there are created (in audio production, broadcasting ...). The linked document also contains a table that shows the diminishing returns of using greater values. I think you can make a case for using 8x, but more than that seems pointless to me (it doesn't hurt either, but it uses more CPU).

And here's an illustration of oversampling for finding true peaks, in case it's useful:
X