Dugan Chen's Homepage

Various Things

Quetzalcoatl Music Player Client For MPD


Quetzalcoatl is a KDE4 music player client for the MPD music server.

When I started it, I asked myself how I could write the best music player I could. Implementing it as an MPD client was a late decision.

I tweaked it for useability in ways I’ll explain soon. Don’t you want to try it first?

How To Get It

You can download Quetzalcoatl from its GitHub page. There are two branches: the default master branch is for Python 2.6 and the python25 branch is for Python 2.5.

It requires python-mpd, 0.3.0 or newer.

PyQt and PyKDE, versions 4.0 or newer, are required.

How It Works

If you learned about Quetzalcoatl before MPD, please learn about MPD first! You set MPD up with such information as where you store your songs. Then you start it up. It runs as a server. Clients such as Quetzalcoatl connect to it and instruct it play songs on the machine it runs on.

You need to have MPD running before Quetzalcoatl can connect to it.

Now here’s how Quetzalcoatl works:


First of all, you can drag the bar between the two panes back and forth to resize them.

The Toolbar

The toolbar icons are configure, connect to MPD, stop, play/pause, previous song, next song, repeat, shuffle, and save playlist.

The Left Pane

The left pane is your music library. The organization is based on the iPod’s. You can change tabs using the scroll mouse.

The “Playlists” tab has your stored playlists. Right-click on one (not the songs in the playlist, but the playlist itself), and you can rename or delete it.

Most of the tabs arrange the songs by their track numbers. The Songs tab, which has every song, arranges them in alphabetical order.

For every tab except “Songs,” double-clicking on a song clears the playlist, fills it with the song’s entire album or stored playlist, and then starts playing that song. You can also select songs by ctrl-clicking and/or shift-clicking and then drag them to the playlist.

Hover the mouse over a song (not a folder, a song), you’ll get a tooltip showing its artist and album.

The Right Pane

The right pane is the current playlist. Drag songs onto it from the left pane, or drag them around inside the playlist to rearrange it. If the right pane is empty, you can just drop them in. If there are already songs there, you have to position the mouse pointer close enough to the existing entries to see a drop position indicator appear.

You can, of course, select multiple playlist songs by control-clicking and shift-clicking. The right side of the status bar shows the combined time of the selected songs. This helps if you’re selecting songs for a mix CD and you want a playlist as close to 74 minutes as possible.

Right-click on a playlist entry, and you’ll get a “delete” option. This will delete the entry you right-clicked on and any others you have selected.

The currently playing song, or the song the server has stopped on, is highlighted in cyan.

Whenever the playlist is nonempty, you can press the “Save Playlist” button to save it as a stored playlist.

Play Button Behavior

What happens when you press the toolbar’s “Play” button depends on the state of the playlist. If you’ve selected one or more songs, the topmost selected song begins to play. Otherwise, if the server has stopped on a song, that song will play. Failing that, the first song in the playlist will play. If the playlist is empty, nothing will happen.

Other Screenshots

The Songs tab, showing the songs in alphabetical order. “Chapel of Ghouls” has just been double-clicked:

The Japanese release of the Princess Mononoke soundtrack, showing off Quetzalcoatl’s support for UTF8-encoded Unicode characters:

screenshot: unicode support

How I Named It

I named Quetzalcoatl for the tools I used to write it. The programming language is Python. The widget toolkit is PyQt. PyQt4 binds the Qt toolkit, which prefixes its identifier names with the letter Q. So I chose a snake-related name that starts with Q.

Yes, I know Python is named for Monty Python. I don’t care. Judging by the covers of O’Reilly’s Python books, they don’t care either.


Special thanks to Harry who provided the patch to get Quetzalcoatl working with Python 2.5.