AkaneTan / Gramophone

A sane music player built with media3 and material design library that is following android's standard strictly.
GNU General Public License v3.0
910 stars 54 forks source link

[FR] ReplayGain tag support #122

Open mcs0042 opened 6 months ago

mcs0042 commented 6 months ago

Thank you for all of your hard work on this excellent project!

Is your feature request related to a problem? Please describe. Some songs or albums are mixed to be quite a bit louder than others. I often find myself manually adjusting the system-wide volume to account for this.

Describe the solution you'd like I've opened an issue to suggest eventually adding ReplayGain tag support to Gramophone. If implemented, Gramophone would automatically adjust the playback volume based on tags indicating how loud an album or a track is. (NB: ReplayGain involves adjusting volumes uniformly across tracks or albums, and does not involve dynamic range compression.)

Describe alternatives you've considered I don't know if there's an alternative to ReplayGain that Gramophone itself would be involved in. If I understand correctly, mp3gain can (reversibly) adjust the volumes of MP3 (and AAC, if I'm not mistaken) files directly, and similar things can be done with other file formats. That being said, it would be nice to have Gramophone honor ReplayGain tags since (a) it would be useful for those who already extensively use tags and (b) Gramophone would be able to take advantage of both album- and track-level loudness data.

Additional context My understanding is that Gramophone is based on Media3 ExoPlayer, and that at least one other open source, ExoPlayer-based music player, namely Auxio, has implemented support for ReplayGain tags. By default, album-level tags are automatically used when an album is playing and track-level tags are used otherwise, assuming both types of tags are present; users can also ask Auxio to always give preference to one type of tag over the other.

Some relevant issues over at Auxio's repo:

nift4 commented 6 months ago

Hi, thank you for the warm words and excellent research. We will add ReplayGain in a future feature release, however, it may take a while. :)

nift4 commented 5 months ago

note to self: also support different reference offset values globally to offset 89db to 95db or something