Emms provides an interface to the Music Player Daemon(MusicPD) software. The package is called `emms-player-mpd' and is provided by the file emms-player-mpd.el.
The advantages of using MusicPD as an EMMS backend include the following.
To load `emms-player-mpd' invoke:
Set the variables emms-player-mpd-server-name and emms-player-mpd-server-port to the location and port (respectively) of your MusicPD server. For example:
(setq emms-player-mpd-server-name "localhost") (setq emms-player-mpd-server-port "6600")
If your MusicPD setup requires a password, you will to set emms-player-mpd-server-password as follows.
(setq emms-player-mpd-server-password "mypassword")
To get track information from MusicPD, invoke the following:
(add-to-list 'emms-info-functions 'emms-info-mpd)
Adding `emms-player-mpd' to your Emms player list is accomplished by invoking:
(add-to-list 'emms-player-list 'emms-player-mpd)
If you use absolute file names in your m3u playlists (which is most likely), make sure you set emms-player-mpd-music-directory to the value of "music_directory" from your MusicPD config. There are additional options available as well, but the defaults should be sufficient for most uses.
You can set emms-player-mpd-sync-playlist to nil if your master EMMS playlist contains only stored playlists.
Connect to MusicPD and retrieve its current playlist. Afterward, the status of MusicPD will be tracked.
Terminate the MusicPD client process and disconnect from MusicPD.
Describe the current EMMS track in the minibuffer. If INSERTP is non-nil, insert the description into the current buffer instead. This function uses emms-show-format to format the current track. It differs from emms-show in that it asks MusicPD for the current track, rather than Emms.
Cause the tracks in DIR to be updated in the MusicPD database.
Cause all tracks in the MusicPD music directory to be updated in the MusicPD database.
Dump all MusicPD data from DIR into the EMMS cache. This is useful to do when you have recently acquired new music.
Dump all MusicPD data into the EMMS cache. This is useful to do once, just before using emms-browser.el, in order to prime the cache.
To activate this, add the following to your .emacs.
(require 'emms-volume) (setq emms-volume-change-function 'emms-volume-mpd-change)