(index ("connect" 0) ("disconnect" 308) ("mpd-connection?" 477) ("mpd-host" 648) ("mpd-port" 783) ("mpd-password" 914) ("mpd-version" 1171) ("ping" 1372) ("clear-error!" 1504) ("get-stats" 1710) ("get-status" 2004) ("shutdown-server!" 2371) ("get-commands" 2459) ("play!" 2588) ("next-song!" 2763) ("previous-song!" 2865) ("stop!" 2979) ("pause!" 3050) ("set-options!" 3177) ("get-output-devices" 3416) ("enable-output-device!" 3564) ("disable-output-device!" 3704) ("get-playlist" 3847) ("get-current-song" 4312) ("get-playlist-changes" 4510) ("add-song!" 4831) ("move-song!" 5086) ("swap-songs!" 5259) ("remove-song!" 5371) ("shuffle-playlist!" 5542) ("clear-playlist!" 5694) ("load-playlist!" 5835) ("remove-playlist!" 6066) ("save-playlist!" 6237) ("find-songs" 6405) ("search-songs" 6685) ("list-metadata" 7032) ("list-directory/r" 7410) ("list-directory" 7703) ("update-song-database!" 7891))
(def (sig (procedure "(connect [HOST] [PORT] [PASSWORD])" (id connect))) (p "Connects to the MPD instance running on " (tt "HOST") " (defaults to " (tt "localhost") ") at " (tt "PORT") " (defaults to " (tt "6600") ").  Optionally authenticates using " (tt "PASSWORD") ". Returns an MPD connection object."))
(def (sig (procedure "(disconnect CONN)" (id disconnect))) (p "Closes the connection to MPD.  " (tt "CONN") " should not be used anymore after calling this function."))
(def (sig (procedure "(mpd-connection? CONN)" (id mpd-connection?))) (p "Returns " (tt "#t") " if " (tt "CONN") " is an MPD connection object, " (tt "#f") " otherwise."))
(def (sig (procedure "(mpd-host CONN)" (id mpd-host))) (p "Returns the hostname field of the MPD connection object " (tt "CONN") "."))
(def (sig (procedure "(mpd-port CONN)" (id mpd-port))) (p "Returns the port field of the MPD connection object " (tt "CONN") "."))
(def (sig (procedure "(mpd-password CONN)" (id mpd-password))) (p "Returns the password field of the MPD connection object " (tt "CONN") ".  This is either a string containing the plain text password or " (tt "#f") " if no authentication should be done."))
(def (sig (procedure "(mpd-version CONN)" (id mpd-version))) (p "Returns the version field of the MPD connection object " (tt "CONN") " which contains the version number received by the MPD server."))
(def (sig (procedure "(ping CONN)" (id ping))) (p "Sends a " (tt "ping") " command to the MPD server, reconnecting if necessary."))
(def (sig (procedure "(clear-error! CONN)" (id clear-error!))) (p "Clears the current error message (which is returned by " (tt "(get-status)") "). This is also done by any command that starts playback."))
(def (sig (procedure "(get-stats CONN)" (id get-stats))) (p "Returns an alist containing various stats:") (pre "#;6> (pp (get-stats m))\n((artists . 183)\n (albums . 429)\n (songs . 6200)\n (uptime . 130260)\n (playtime . 49958)\n (db_playtime . 1773229)\n (db_update . 1152376960.0))\n#;7>"))
(def (sig (procedure "(get-status CONN)" (id get-status))) (p "Return an alist describing the current status of MPD:") (pre "#;9> (pp (get-status m))\n((volume . 78)\n (repeat . #f)\n (random . #f)\n (playlist . 78)\n (playlistlength . 77)\n (xfade . 0)\n (state . play)\n (song . 12)\n (songid . 12)\n (time 31 623)\n (bitrate . 128)\n (audio 44100 16 2))\n#;10>"))
(def (sig (procedure "(shutdown-server! CONN)" (id shutdown-server!))) (p "Kill MPD."))
(def (sig (procedure "(get-commands CONN)" (id get-commands))) (p "Returns a list of commands the current user has access to."))
(def (sig (procedure "(play! CONN #!optional SONG TIME)" (id play!))) (p "Start playing at song " (tt "SONG") " (or the first in playlist) at " (tt "TIME") " (in seconds)."))
(def (sig (procedure "(next-song! CONN)" (id next-song!))) (p "Play the next song in the playlist."))
(def (sig (procedure "(previous-song! CONN)" (id previous-song!))) (p "Play the previous song in the playlist."))
(def (sig (procedure "(stop! CONN)" (id stop!))) (p "Stop playback."))
(def (sig (procedure "(pause! CONN PAUSE?)" (id pause!))) (p "Pause if " (tt "PAUSE?") " is true, resume playing otherwise."))
(def (sig (procedure "(set-options! CONN . OPTS)" (id set-options!))) (p "Set playback options.  Options are: " (tt "#:crossfade") ", " (tt "#:random") ", " (tt "#:repeat") " and " (tt "#:volume") " and they can be mapped to arguments."))
(def (sig (procedure "(get-output-devices CONN)" (id get-output-devices))) (p "Returns a list of alists describing the available output devices."))
(def (sig (procedure "(enable-output-device! CONN ID)" (id enable-output-device!))) (p "Enables the output device with id " (tt "ID") "."))
(def (sig (procedure "(disable-output-device! CONN ID)" (id disable-output-device!))) (p "Disables the output device with id " (tt "ID") "."))
(def (sig (procedure "(get-playlist CONN [ID])" (id get-playlist))) (p "Return a list of alists describing the songs in the current playlist. (Optionally only the song with id " (tt "ID") "):") (pre "#;10>  (pp (get-playlist m 12))\n(((Id . 12)\n  (Pos . 12)\n  (Time . 623)\n  (Title . \"the leper affinity\")\n  (Track . 1)\n  (Album . \"blackwater park\")\n  (Artist . \"opeth\")\n  (file . \"metal/opeth/blackwater park/01 the leper affinity.mp3\")))\n#;11>"))
(def (sig (procedure "(get-current-song CONN)" (id get-current-song))) (p "Returns an alist with information about the current song (the same information that " (tt "(get-playlist)") " returns)."))
(def (sig (procedure "(get-playlist-changes CONN VERSION)" (id get-playlist-changes))) (p "Return a list of alists describing new songs since playlist version " (tt "VERSION") ". Note: to detect songs that were deleted at the end of the playlist, use the " (tt "playlistlength") " returned by " (tt "(get-status)") "."))
(def (sig (procedure "(add-song! CONN PATH)" (id add-song!))) (p "Adds " (tt "PATH") " (a string naming a file or directory) to the end of the current playlist.  Directories are added recursively.  Increments playlist version by 1 for each added song."))
(def (sig (procedure "(move-song! CONN FROM TO)" (id move-song!))) (p "Move song at position " (tt "FROM") " to " (tt "TO") ".  The playlist version is incremented by 1."))
(def (sig (procedure "(swap-songs! CONN SONG1 SONG2)" (id swap-songs!))) (p "Swap position of the two songs."))
(def (sig (procedure "(remove-song! CONN SONG)" (id remove-song!))) (p "Remove the song SONG (position or ID) from playlist.  The playlist version is incremented by 1."))
(def (sig (procedure "(shuffle-playlist! CONN)" (id shuffle-playlist!))) (p "Shuffles the current playlist and increments the playlist version by 1."))
(def (sig (procedure "(clear-playlist! CONN)" (id clear-playlist!))) (p "Clears the current playlist, incrementing playlist version by 1."))
(def (sig (procedure "(load-playlist! CONN PLAYLIST)" (id load-playlist!))) (p "Loads the playlist named " (tt "\"PLAYLIST.m3u\"") " from the playlist directory. The playlist version is incremented by the number of songs added."))
(def (sig (procedure "(remove-playlist! CONN PLAYLIST)" (id remove-playlist!))) (p "Removes the playlist named " (tt "\"PLAYLIST.m3u\"") " from the playlist directory."))
(def (sig (procedure "(save-playlist! CONN PLAYLIST)" (id save-playlist!))) (p "Saves the current playlist to " (tt "\"PLAYLIST.m3u\"") " in the playlist directory."))
(def (sig (procedure "(find-songs CONN TYPE STRING)" (id find-songs))) (p "Searches for songs and returns a list of alists.  " (tt "TYPE") " is e.g. " (tt "'title") ", " (tt "'album") " or " (tt "'artist") ".  " (tt "STRING") " is the search string (which must match exactly)."))
(def (sig (procedure "(search-songs CONN TYPE SEARCHSTRING)" (id search-songs))) (p "Returns a list of alists describing the matching songs.  " (tt "TYPE") " is e.g. " (tt "'title") ", " (tt "'album") " or " (tt "'artist") ".  " (tt "SEARCHSTRING") " is the string which is searched for (not case sensitive, doesn't need to be an exact match)."))
(def (sig (procedure "(list-metadata CONN TYPE [LIMIT STRING])" (id list-metadata))) (p "Return a list of values of metadata " (tt "TYPE") " (e.g. " (tt "'title") ", " (tt "'album") " or " (tt "'artist") "), optionally limited by " (tt "LIMIT") " and " (tt "STRING") ". E.g. " (tt "(list-metadata m 'album 'artist \"nevermore\")") " to get a list of all albums by Nevermore."))
(def (sig (procedure "(list-directory/r CONN [PATH] [FULL #t])" (id list-directory/r))) (p "Returns a list of all songs (below " (tt "PATH") ", if given). If " (tt "FULL") " is " (tt "#t") " (default), list all metadata.  If " (tt "FULL") " is " (tt "#f") ", return only filename metadata."))
(def (sig (procedure "(list-directory CONN [PATH])" (id list-directory))) (p "Like " (tt "(list-directory/r)") ", with " (tt "FULL") " as #t.  The data is returned as a list of alists."))
(def (sig (procedure "(update-song-database! CONN [PATH])" (id update-song-database!))) (p "Updates MPD's database, removing old songs and adding new songs.  Optionally, the update process can be limited to " (tt "PATH") " (a string naming a file or directory)."))
