[Solved] Is ReplayGain supported?


just discovered Volumio. Searched the forum and FAQ but couldn’t find anything concerning ReplayGain.

Is it supported? If yes, how do turn it on? Edit the mpd.conf?

Any information regarding RG would be great.

Thanks in advance!


Yep, is supported, you can activate it by going to playbakc -> replay gain.
In the webui


Sorry to dig up an old thread but I can’t find the setting in the GUI. I can see “Volume normalization” but that’s not the same.

I can edit /etc/mpd.conf to add the configuration values in manually but then if I change settings via the GUI they’re lost. For those wanting to know, here’s a quick way of adding support.

echo 'replaygain "album"' >> /etc/mpd.conf
echo 'replaygain_preamp "0"' >> /etc/mpd.conf
echo 'replaygain_limit "yes"' >> /etc/mpd.conf

/etc/init.d/mpd restart

Just wondered if support for these settings via the GUI was on the “todo list” or not? Would certainly be appreciated.

Michelangelo - how do we get this added to the mpd.conf file without it being overwritten if we make changes in the playback tab of the web UI?

BTW - I am using replaygain “auto” which automatically switches from album mode to track mode when MPD is playing random songs via shuffle.

i think its possible but it need much coding.

Added it to the list.

Thanks Michelangelo, it’s not much hassle to do it manually but it would certainly be a welcome addition. Or perhaps a temporary solution would be to not complete rewrite the mpd.conf file, but instead only change individual values that have been modified via the GUI, thus preserving any custom settings.

I’m currently playing around with the Volumino2-UI code to add ReplayGain support.
I have absolutely no JavaScript experience and it’s driving me nuts :wink:

I always get “VALUE NOT FOUND BETWEEN SELECT OPTIONS!” in WebUI for my new ReplayGain Options and the created mpd.conf always sets “undefined” for those.

Can somebody look at my code and point me to the errors?

I created a “replaygain” branch: https://github.com/sebastian-de/Volumio2/tree/replaygain

Good work!
It’s not working, because you try to read something from configuration which has not been set.

We recently added a method to set a default option for a setting. So the line

value = self.getAdditionalConf('music_service', 'mpd', 'replaygain');

Will become, with a default option

value = self.getAdditionalConf('music_service', 'mpd', 'replaygain', 'off');

With ‘off’ , being the default option.

In any case, your code is perfect. But it will not work unless you remove the configuration in /data/configuration/*

with the above fix, it should work. Let me know

Thanks for your feedback, I got it working that way!

I’ll rewrite the changes against current master and send you a pull request.


Great, thanks!

PS: Make sure that replaygain is visible only volume is not set to ‘None’ (but if you want, you can leave it up to me)

I’m not sure what you mean by that. But I was thinking about polishing the UI part of ReplayGain support, for example hiding the ReplayGain options when it is disabled.

Unfortunately I’m currently having trouble to connect to Volumio when running the ‘master’ or ‘dev’ branch (I’ll open another topic because of this), so it’ll take som more time…

Hey michelangelo,

now my dev-image works fine and I rewrote the changes, so that they can automatically merged with current master.

I also added an option for replaygain_limit and added the UI switch I was talking about (https://github.com/sebastian-de/Volumio2/tree/replaygain_update).

In the UI the switch works as expected, but I also want to set ‘replaygain_mode’ to ‘off’ automatically, when "replaygain_enabled’ is set to ‘false’.
i don’t know how to do this correctly, a failed attempt looked like this: https://github.com/sebastian-de/Volumio2/commit/c1ab0c72f6d77f0a92b296a21de0a64c920cc17b
Maybe this marks the end of my script-kiddie skills :blush:

Can I leave this final task up to you and send you a PR?

It is everything fine. However I would put a visibleif option in the UI to hide all the fields when off.
Look at the static\dhcp section in network

I’ sorry I can’t figure it out :frowning:
I only get visibleIf working correctly with a bool, but ‘replaygain_mode’ is a string. The values ‘album’,‘track’ and ‘auto’ should show further options, only ‘off’ shouldn’t
That’s why I added the ‘replaygain_enabled’ switch, which is a bool.