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)
Unless your MusicPD is configured to use absolute file names, you must set the emms-player-mpd-music-directory variable to the value of 'music_directory' in your MusicPD configuration. There are additional options available as well, but the defaults should be sufficient for most uses.
Once you've done the above, run the M-x emms-cache-set-from-mpd-all command to fill the Emms cache with the contents of your MusicPD database. The music in your MusicPD database should then be accessible via the EMMS browser.
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)