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: "True peak" and ReplayGain (Read 5405 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

"True peak" and ReplayGain

Pardon if this has been asked before...

If i'm writing a ReplayGain (2.0) implementation, is there any value in calculating "true peak" values rather than sample peaks? If so, these are often above 1.0 - should I store a maximum of 1.000000?

The specification says that lossy files may have peaks over 1.0, but lossless files really shouldn't be able to. This is of course unless we're talking about true peaks.

Maybe i'll just avoid the whole issue and store sample peaks. I guess this field is of dubious utility anyhow.

http://wiki.hydrogenaud.io/index.php?title=ReplayGain_2.0_specification#Peak_amplitude

Re: "True peak" and ReplayGain

Reply #1
Intersample peaks may affect playback hardware, but probably won't be noticeable in most situations.

Re: "True peak" and ReplayGain

Reply #2
At least foobar doesn't use true peak.
https://hydrogenaud.io/index.php/topic,114125.msg940028.html#msg940028

Anyway there is no truth about TP, different VST plugins report different TP values, and some product advertisements said their implementation are better than the one described in BS.1770.
https://forum.cockos.com/showpost.php?p=1843694&postcount=95

Re: "True peak" and ReplayGain

Reply #3
Small correction to bennetng's claim, foobar2000 has had True Peak capability since version 1.3.9. It's not enabled by default but user can specify oversample factor in preferences.

How useful it is depends on files. In regular music small clipping goes unnoticed but with special signals it can make a huge difference.

I'll attach a test file you can try with WASAPI output at 100% volume to see for yourself. If you don't use clipping prevention vast majority of DACs will play the file audibly wrong. The peak value was scanned with foobar2000 using 4x oversampling, which is enough for the source file's sampling rate.

 

Re: "True peak" and ReplayGain

Reply #4
Thanks for telling me about the oversampling factor which I overlooked. I never touch it and the default is 1.

[EDIT]Enabled 4x oversampling and scanned the SquareSweep.wav in the attachment of this post
https://hydrogenaud.io/index.php/topic,114125.msg940028.html#msg940028

Now the 4x oversampled RG shows 1.743334, which means +4.83dBTP, but I needed to reduce 6dB in my video to completely eliminate clipping for the Realtek.