Musical tips for working with MPDroid and an Archpile-based box

Getting MPDroid working with an Archphile-based box

Learn how to navigate the challenges of this kind of music player set up.

Black vinyl LP record
Image credits : 
Rikki Endsley. CC BY-SA 4.0
x

Subscribe now

Get the highlights in your inbox every week.

I have mentioned before that my music player connected to my home stereo is MPD (Music Player Daemon). Briefly, this is because I run it on a small, dedicated computer called a CuBox-i4Pro. My main reason for choosing this particular model was that it gave me the option to use an eSATA connection to my hard drive that stores my music library, leaving the USB ports free for connecting to my digital-analog converter. There are other such devices out there, but the CuBox-i series seem to be about the least expensive.

Since I acquired the CuBox-i, I have experimented with three Linux distros that support it: first Voyage Linux; then Volumio; and currently Archphile (an Archlinux ARM/MPD-based distribution for Raspberry Pi, Udoo Quad, and Cubox-i). For now, I am sticking with Archphile, as it offers a lighter-weight experience than Volumio and seems more up-to-date than Voyage (at least for the CuBox-i).

Because this is a headless computer, I need to control it with something. For that purpose, I use MPDroid on my phone running Android, although I can also access it using the ympd instance running on Archphile. Getting the MPDroid client to work acceptably with my Archphile-based box has been surprisingly challenging, so I thought I would share the lessons I've learned along the way.

First, I should say that the Archphile instructions to get the music server up and running are flawless, so by all means follow them. Note especially the need to configure the mongoose light-weight web server to provide cover art to the MPDroid client, and to tell MPDroid where to look for cover art. (Those instructions can be found midway down this page or by searching for "mpdroid" on the Archphile site.)

Once all that is running, I was delighted to see some of my cover art coming up, but puzzled as to why many albums showed no cover art. Also, I found that some of my tags were in less-than-perfect state, with MPDroid showing the same album twice, sometimes with different titles and contents.

As a result, I recently sat down to do detective work. With respect to tags, the main lesson is that it's impossible to be too attentive to correct Artist, Album Artist, Album, Year, Disc, and any other tags that might be attached to the songs in a given album. And, as far as I can tell, Archphile doesn't have a decent tag editor in its packages. So I have taken to curating my library on my laptop and then replacing the old, less-pristine contents on the server. The tool I prefer for editing tags is EasyTAG, although I sometimes use the tag-editing capability in my laptop's music player (currently gmusicbrowser).

My music tag correction process

Here are the steps I now follow, in greater detail:

  • Use EasyTAG to review and edit tags on local machine, paying particular attention to tags that are meant to be common for all music files in a given album.
    • MPDroid seems to struggle with Album tags that contain a hyphen, showing two directories with the part before and the part after the hyphen as names for each directory; consider replacing any hyphen in the Album tag with a colon, a space, or an underscore.

Updating cover art images one at a time screenshot

EasyTAG showing embedded cover art (note Description does not mention cover.jpg file name).

  • Use EasyTAG to delete cover art and replace it with a cover.jpg file in the album directory.
    • Watch out for files named Cover.jpg rather than cover.jpg.
    • Avoid .png or other alternatives to .jpg.
    • Avoid already-embedded images (delete them).
  • Save changes. The album directory is now ready to go.
  • Remove the corresponding directory on the music server.
  • Use ympd to update the MPD database on the music server.
  • Check on the MPDroid client to confirm that the old album has now disappeared.
  • Copy the files across. (I mount the remote filesystem with nautilus and use it to copy.)
  • On the remote machine, using a terminal window and the shell, adjust ownership and access permissions (as superuser). For example, I have this in a shell script:
    chown -R mpd:audio Bombino
    chmod -R ugo+rw Bombino
    chmod ugo+x Bombino
    chmod ugo+x Bombino/*
    
  • Use ympd to update the MPD database.
  • Check on the MPDroid client to confirm that the new version of the album is in place.
    • In album view, drag to refresh and scroll down to the album.
    • Hold down the album cover and select reset image.
    • Click on the album cover and the new image should appear.

Results

This process has fixed all but 2 of 500 albums in my music database. For some reason, the other two show different Album Artist tags despite being corrected (several times). I suspect that something cached somewhere is messing with all this and I haven't yet been able to find it.

Updating cover art images one at a time.

Updating cover art images one at a time.

At some points in this learning process I have been frustrated enough to delete the image cache, which means I have to then go through all the albums one by one clicking on their covers to get the images back. Too obsessive? I'll let others judge. In the end, I'm satisfied with the results.

You might wonder how my music library got to be in such a mess in the first place. There are lots of reasons for this, starting with the process of ripping music and being careless with tags and cover art. And surely this MPD/MPDroid combination is the least-forgiving environment for tags and cover art that I have yet to encounter—my library has looked fine on my laptop music player for quite some time now.

More music from Linux-friendly sources

A while ago, I wrote about field recordings. Since then, I've kept my eye open for more of this kind of material, and I recently stumbled on Selected Field Recordings Vol. 1 by Callum Stephen Higgins and Jim Dickinson Field Recordings Delta Experimental Project Vol. 3 on Bleep. Two extremes of the genre, I would imagine—the former is actually a recording in a field; the latter a selection of blues/country musicians recorded very live.

Also I recently discovered on Bleep a wonderful atmospheric ambient album, Departed Glories by Biosphere, inspired by the recently discovered work of Russian photographer Sergie Prokudin-Gorsky. The image shown on the album cover makes me think this music is somehow a kind of constructed field recording, both due to the sort of music that it is, and to its source of inspiration.

And from the "getting Linux-friendly, but not quite there yet": Hdtracks offers one of the largest selections of high-resolution downloads, but Linux users have always struggled with their offering, due to its use of mandatory download software. For the past few years, this has been an executable available only for those two commercial operating systems we Linux fans tend to avoid, and therefore acquiring music from that vendor has required unpleasant effort and compromise. However, I recently stumbled upon a Linux version of this downloader, provided for free by the company that makes the other downloaders, JRiver. No, it's not open source. Yes it has bugs. But readers interested in giving it a try should visit the forum topic here. Note that it only provides download services; no financial info is stored in it. (And no, this isn't a recommendation.)

About the author

Chris Hermansen portrait Temuco Chile
Chris Hermansen - Seldom without a computer of some sort since graduating from the University of British Columbia in 1978, I have been a full-time Linux user since 2005, a full-time Solaris and SunOS user from 1986 through 2005, and UNIX System V user before that. On the technical side of things, I have spent a great deal of my career as a consultant, doing data analysis and visualization; especially spatial data analysis. I have a substantial amount of related programming experience, using C, awk, Python,...