I think we have to start somewhere. So I’d go and tackle “MediaFile” first, to get a feel for it and provide more ReplayGain 2 stuff that loudgain has to offer.
Three questions @adrian:
If any new entries are added to MediaFile, would beets automatically know about them or even possibly store them in the database (thinking of
If not, how to make that happen?
For some more exotic uses, loudgain has the ability to store loudness and gain values postfixed with a “LU” unit (instead of “dB”). This is already correctly handled by IDJC and all players that simply use C’s
atof()to get at the values.
Would something like this work?
rg_album_gain = MediaField( MP3DescStorageStyle( u'REPLAYGAIN_ALBUM_GAIN', float_places=2, suffix=u' dB' ), MP3DescStorageStyle( u'replaygain_album_gain', float_places=2, suffix=u' dB' ), MP3DescStorageStyle( u'REPLAYGAIN_ALBUM_GAIN', float_places=2, suffix=u' LU' ), MP3DescStorageStyle( u'replaygain_album_gain', float_places=2, suffix=u' LU' ), …
Loudness Units (LU) as specified by the EBU are equivalent to dB (1 LU = 1 dB).
Concerning the reference loudness (which some programs would tag as “89 dB” and loudgain as “-18.00 LUFS”), what would beets expect? dB values, LUFS values, or would it simply not care and just handle it as an arbitrary field?
Would a construct like the above (one for “dB”, one for “LUFS”) be able to do any calculations (dB to LUFS reference can be calculated as “dB - 107”)?