DSD to PCM conversion not applying Audio Engine gain to Replaygain values

Music Converter | CD Ripper | Disc Burner
General discussion / Request help
Post Reply
paulster
Silver
Silver
Posts: 121
Joined: Thu Dec 11, 2008 2:41 pm
Location: Los Angeles/London
Contact:

DSD to PCM conversion not applying Audio Engine gain to Replaygain values

Post by paulster » Wed Feb 21, 2024 9:43 am

I just noticed that when you convert a DSD file to PCM with a positive gain value set in the Audio Engine settings, if you have already run a Replaygain scan to determine how much headroom is available and what gain level to set, it writes Replaygain tags to the PCM files based on the DSD files and doesn't factor in the additional gain.

So, in my case I had an SACD with a peak value of -6.22dB. I converted it to PCM with a +6dB gain value, and the Replaygain tags were written with -6.22dB as the album peak. When I went back and scanned the Replaygain again I got the correct -0.22dB figure and could save that.
User avatar
poiko
Site Admin
Site Admin
Posts: 4810
Joined: Sat Mar 11, 2006 8:31 pm
Location: https://www.poikosoft.com
Contact:

Re: DSD to PCM conversion not applying Audio Engine gain to Replaygain values

Post by poiko » Wed Feb 21, 2024 12:36 pm

ReplayGain tags are copied from source to destination during file conversion. So they are wrong if you calculated them with 0 dBFS setting and then converted with +6 dBFS setting.

You can use "Scan loudness and include R 128 | ReplayGain metadata" to re-calculate ReplayGain tags during the conversion:

Untitled-1.png
Untitled-1.png (13.05 KiB) Viewed 366 times
paulster
Silver
Silver
Posts: 121
Joined: Thu Dec 11, 2008 2:41 pm
Location: Los Angeles/London
Contact:

Re: DSD to PCM conversion not applying Audio Engine gain to Replaygain values

Post by paulster » Wed Feb 21, 2024 7:33 pm

In this instance the tags were unsaved and not written in the DSD files though.

What I did was open the .DSF files, scan ReplayGain to see what the album peak was (-6.22dB in this case), and then choose the gain level for the PCM conversion and then run the conversion without re-loading the files. When I did the conversion the unsaved ReplayGain tags were written to the PCM files despite not actually existing in the original files.

I would think that whenever you are doing a DSD to PCM conversion (or vice versa, where there is a fixed -6dB gain) it would make sense to alter the ReplayGain tag values (whether in the files or in memory as unsaved tags) by the gain factor. Otherwise the tags written to the converted files will always be incorrect when this type of conversion is happening.
User avatar
poiko
Site Admin
Site Admin
Posts: 4810
Joined: Sat Mar 11, 2006 8:31 pm
Location: https://www.poikosoft.com
Contact:

Re: DSD to PCM conversion not applying Audio Engine gain to Replaygain values

Post by poiko » Wed Feb 21, 2024 9:36 pm

You can also either reload the files or clear the ReplayGain tags prior the conversion. Especially if you do not want the ReplayGain tags to exist at all.
paulster
Silver
Silver
Posts: 121
Joined: Thu Dec 11, 2008 2:41 pm
Location: Los Angeles/London
Contact:

Re: DSD to PCM conversion not applying Audio Engine gain to Replaygain values

Post by paulster » Sun Feb 25, 2024 9:18 am

I completely get the workaround, and I typically wipe and reload the files before processing, but my point here is that you'e knowing writing incorrect Replaygain values when you are applying a positive or negative gain adjustment during a file conversion, so I'd call that a bug.
User avatar
poiko
Site Admin
Site Admin
Posts: 4810
Joined: Sat Mar 11, 2006 8:31 pm
Location: https://www.poikosoft.com
Contact:

Re: DSD to PCM conversion not applying Audio Engine gain to Replaygain values

Post by poiko » Mon Mar 04, 2024 11:18 am

I will test it again.

If you convert from file to file the ReplayGain metadata is copied as it is (so it's wrong if you first calculated the metadata with different DSP gain). If you want to calculate the new (possibly correct) ReplayGain information then you need to enable "Scan loudness and include EBU R 128 | ReplayGain metadata" from the Options.
Post Reply