After changing /volumio/app/plugins/music_service/mpd/mpd.conf.tmpl it is possible to regenerate /etc/mpd.conf by going to the Web UI and in Settings > Playback Options and clicking on Save in the Audio Output section.
I would like to trigger the regeneration from a bash script. Is there a command that will cause /etc/mpd.conf to be regenerated?
Does anyone have any thoughts on this? It doesn’t have to be a single command, a small script would be fine. I just want to be able to automate the change so I can make an installer for Volumio.
What is it that you’re trying to achieve by editing the template? That’s not really designed to be a user-editable file, and it may break updates for you.
I have a project that includes an audio visualiser (spectrum display)
Volumio does not provide a way to configure a copy of the playing audio, which is needed for audio visualisation.
An incomplete, but easy and reliable way to make a copy is by adding an audio output section to /etc/mpd.conf, which means editing mpd.conf.tmpl.
The changes can be undone, to allow updates, by running
volumio updater restorevolumio
(not that this command changes /etc/mpd.conf !)
Any other suggestions for making a (software) copy of the playing audio would also be welcome. The following thread looks at the use of ALSA configuration, but is tricky to give instructions for, and I am not sure if the configuration will be overwritten by Volumio or plugins
Next Volumio based on buster will use a new alsa layout. It will be very easy to create a plugin to route audio output to a pipe. It is already in test with the peppymeter plugin. Don’t waste time with mpd.conf.
It sounds like what you want will be the new support for pluggable ALSA contributions from Volumio plugins coming in the buster development stream. I know that @balbuze is doing something similar for peppy to provide a vu meter right now, so perhaps he will be best placed to help.
Thanks for your replies. It is great that there is a solution to this on the horizon.
For now though, I would like to make it easy to install mpd_oled on the current Volumio. I am therefore still interested in whether anybody knows how to trigger the regeneration of /etc/mpd.conf on the command line.