Closed magicgoose closed 1 year ago
A challenging aspect of audio metadata is that what is written down in reference materials is not necessarily what is implemented in practice. From what I can tell, most players implement ReplayGain for Musepack via the APEv2 tags. Are there any players that you are aware of that only read the headers?
For some time, latest preview(1.4.x) builds of foobar2000 for Android were only able to work with header gain info in MPC files, but soon after I opened this ticket, the author clarified that this was not intentional and promised to restore support for ReplayGain in Musepack via the APEv2 tags.
So, from personal PoV, it is not that critical now.
I also did a bit of research in the meantime, how it could be done - it's a bit convoluted, so it definitely makes sense to not spend time on it if there are ways around it.
there are more details in https://hydrogenaud.io/index.php/topic,124767.0.html
I've already implemented writing to the Musepack header. The program's current functionality writes all zeros to the RG header, effectively clearing any preexisting info to avoid conflicts with the RG info stored in the APEv2 tag.
I will consider adding an option to write to the header instead of APEv2 tag in a future version.
After reviewing the matter, I now recall why I didn't support writing gain to the Musepack header when I first implemented Musepack support. The Musepack header actually uses loudness values, not gain, and they are the dB SPL values specified by ReplayGain 1.0. This is a ReplayGain 2.0 scanner, and there is no one-to-one conversion factor between LUFS and dB SPL.
I'm going to keep the existing behavior for Musepack, i.e. write zeros to the header, save ReplayGain values as APEv2 tag. From the thread you linked, it sounds like the issue was fixed in Foobar, so you should be good regardless.
there is no one-to-one conversion factor between LUFS and dB SPL
as I understood, it can be meaningfully converted, it's just a rather weird formula. but yes, with regards to foobar, this is no longer a problem.
https://wiki.hydrogenaud.io/index.php/ReplayGain#Musepack_ReplayGain
This makes MPC's own ReplayGain tag more useful/universal.