Clears the current error message in status (this is also
Clears the current error message in status (this is also
accomplished by any command that starts playback).
accomplished by any command that starts playback).
.. _command_currentsong:
:command:`currentsong`
:command:`currentsong`
Displays the song info of the current song (same song that
Displays the song info of the current song (same song that
is identified in status). Information about the current song
is identified in status). Information about the current song
...
@@ -477,6 +481,8 @@ Querying :program:`MPD`'s status
...
@@ -477,6 +481,8 @@ Querying :program:`MPD`'s status
:program:`MPD` versions used to have a "magic" value for
:program:`MPD` versions used to have a "magic" value for
"unknown", e.g. ":samp:`volume: -1`".
"unknown", e.g. ":samp:`volume: -1`".
.. _command_stats:
:command:`stats`
:command:`stats`
Displays statistics.
Displays statistics.
...
@@ -492,17 +498,25 @@ Querying :program:`MPD`'s status
...
@@ -492,17 +498,25 @@ Querying :program:`MPD`'s status
Playback options
Playback options
================
================
.. _command_consume:
:command:`consume {STATE}` [#since_0_15]_
:command:`consume {STATE}` [#since_0_15]_
Sets consume state to ``STATE``,
Sets consume state to ``STATE``,
``STATE`` should be 0 or 1.
``STATE`` should be 0 or 1.
When consume is activated, each song played is removed from playlist.
When consume is activated, each song played is removed from playlist.
.. _command_crossfade:
:command:`crossfade {SECONDS}`
:command:`crossfade {SECONDS}`
Sets crossfading between songs.
Sets crossfading between songs.
.. _command_mixrampdb:
:command:`mixrampdb {deciBels}`
:command:`mixrampdb {deciBels}`
Sets the threshold at which songs will be overlapped. Like crossfading but doesn't fade the track volume, just overlaps. The songs need to have MixRamp tags added by an external tool. 0dB is the normalized maximum volume so use negative values, I prefer -17dB. In the absence of mixramp tags crossfading will be used. See http://sourceforge.net/projects/mixramp
Sets the threshold at which songs will be overlapped. Like crossfading but doesn't fade the track volume, just overlaps. The songs need to have MixRamp tags added by an external tool. 0dB is the normalized maximum volume so use negative values, I prefer -17dB. In the absence of mixramp tags crossfading will be used. See http://sourceforge.net/projects/mixramp
.. _command_mixrampdelay:
:command:`mixrampdelay {SECONDS}`
:command:`mixrampdelay {SECONDS}`
Additional time subtracted from the overlap calculated by mixrampdb. A value of "nan" disables MixRamp overlapping and falls back to crossfading.
Additional time subtracted from the overlap calculated by mixrampdb. A value of "nan" disables MixRamp overlapping and falls back to crossfading.
...
@@ -512,6 +526,8 @@ Playback options
...
@@ -512,6 +526,8 @@ Playback options
Sets random state to ``STATE``,
Sets random state to ``STATE``,
``STATE`` should be 0 or 1.
``STATE`` should be 0 or 1.
.. _command_repeat:
:command:`repeat {STATE}`
:command:`repeat {STATE}`
Sets repeat state to ``STATE``,
Sets repeat state to ``STATE``,
``STATE`` should be 0 or 1.
``STATE`` should be 0 or 1.
...
@@ -522,6 +538,8 @@ Playback options
...
@@ -522,6 +538,8 @@ Playback options
Sets volume to ``VOL``, the range of
Sets volume to ``VOL``, the range of
volume is 0-100.
volume is 0-100.
.. _command_getvol:
:command:`getvol`
:command:`getvol`
Read the volume. The result is a ``volume:`` line like in
Read the volume. The result is a ``volume:`` line like in
...
@@ -532,12 +550,16 @@ Playback options
...
@@ -532,12 +550,16 @@ Playback options
volume: 42
volume: 42
OK
OK
.. _command_single:
:command:`single {STATE}` [#since_0_15]_
:command:`single {STATE}` [#since_0_15]_
Sets single state to ``STATE``,
Sets single state to ``STATE``,
``STATE`` should be ``0``, ``1`` or ``oneshot`` [#since_0_20]_.
``STATE`` should be ``0``, ``1`` or ``oneshot`` [#since_0_20]_.
When single is activated, playback is stopped after current song, or
When single is activated, playback is stopped after current song, or
song is repeated if the 'repeat' mode is enabled.
song is repeated if the 'repeat' mode is enabled.
.. _command_replay_gain_mode:
:command:`replay_gain_mode {MODE}` [#since_0_16]_
:command:`replay_gain_mode {MODE}` [#since_0_16]_
Sets the replay gain mode. One of
Sets the replay gain mode. One of
``off``,
``off``,
...
@@ -551,11 +573,15 @@ Playback options
...
@@ -551,11 +573,15 @@ Playback options
This command triggers the
This command triggers the
``options`` idle event.
``options`` idle event.
.. _command_replay_gain_status:
:command:`replay_gain_status`
:command:`replay_gain_status`
Prints replay gain options. Currently, only the
Prints replay gain options. Currently, only the
variable ``replay_gain_mode`` is
variable ``replay_gain_mode`` is
returned.
returned.
.. _command_volume:
:command:`volume {CHANGE}`
:command:`volume {CHANGE}`
Changes volume by amount ``CHANGE``.
Changes volume by amount ``CHANGE``.
Deprecated, use :ref:`setvol <command_setvol>` instead.
Deprecated, use :ref:`setvol <command_setvol>` instead.
...
@@ -563,41 +589,59 @@ Playback options
...
@@ -563,41 +589,59 @@ Playback options
Controlling playback
Controlling playback
====================
====================
.. _command_next:
:command:`next`
:command:`next`
Plays next song in the playlist.
Plays next song in the playlist.
.. _command_pause:
:command:`pause {STATE}`
:command:`pause {STATE}`
Pause or resume playback. Pass :samp:`1` to pause playback or
Pause or resume playback. Pass :samp:`1` to pause playback or
:samp:`0` to resume playback. Without the parameter, the pause
:samp:`0` to resume playback. Without the parameter, the pause
state is toggled.
state is toggled.
.. _command_play:
:command:`play [SONGPOS]`
:command:`play [SONGPOS]`
Begins playing the playlist at song number
Begins playing the playlist at song number
``SONGPOS``.
``SONGPOS``.
.. _command_playid:
:command:`playid [SONGID]`
:command:`playid [SONGID]`
Begins playing the playlist at song
Begins playing the playlist at song
``SONGID``.
``SONGID``.
.. _command_previous:
:command:`previous`
:command:`previous`
Plays previous song in the playlist.
Plays previous song in the playlist.
.. _command_seek:
:command:`seek {SONGPOS} {TIME}`
:command:`seek {SONGPOS} {TIME}`
Seeks to the position ``TIME`` (in
Seeks to the position ``TIME`` (in
seconds; fractions allowed) of entry
seconds; fractions allowed) of entry
``SONGPOS`` in the playlist.
``SONGPOS`` in the playlist.
.. _command_seekid:
:command:`seekid {SONGID} {TIME}`
:command:`seekid {SONGID} {TIME}`
Seeks to the position ``TIME`` (in
Seeks to the position ``TIME`` (in
seconds; fractions allowed) of song
seconds; fractions allowed) of song
``SONGID``.
``SONGID``.
.. _command_seekcur:
:command:`seekcur {TIME}`
:command:`seekcur {TIME}`
Seeks to the position ``TIME`` (in
Seeks to the position ``TIME`` (in
seconds; fractions allowed) within the current song. If
seconds; fractions allowed) within the current song. If
prefixed by ``+`` or ``-``, then the time is relative to the
prefixed by ``+`` or ``-``, then the time is relative to the
current playing position.
current playing position.
.. _command_stop:
:command:`stop`
:command:`stop`
Stops playing.
Stops playing.
...
@@ -632,11 +676,15 @@ client can always be sure the correct song is being used.
...
@@ -632,11 +676,15 @@ client can always be sure the correct song is being used.
Many commands come in two flavors, one for each address type.
Many commands come in two flavors, one for each address type.
Whenever possible, ids should be used.
Whenever possible, ids should be used.
.. _command_add:
:command:`add {URI}`
:command:`add {URI}`
Adds the file ``URI`` to the playlist
Adds the file ``URI`` to the playlist
(directories add recursively). ``URI``
(directories add recursively). ``URI``
can also be a single file.
can also be a single file.
.. _command_addid:
:command:`addid {URI} [POSITION]`
:command:`addid {URI} [POSITION]`
Adds a song to the playlist (non-recursive) and returns the
Adds a song to the playlist (non-recursive) and returns the
song id. ``URI`` is always a single file or URL. For example::
song id. ``URI`` is always a single file or URL. For example::
...
@@ -645,6 +693,8 @@ Whenever possible, ids should be used.
...
@@ -645,6 +693,8 @@ Whenever possible, ids should be used.
Id: 999
Id: 999
OK
OK
.. _command_clear:
:command:`clear`
:command:`clear`
Clears the queue.
Clears the queue.
...
@@ -653,15 +703,21 @@ Whenever possible, ids should be used.
...
@@ -653,15 +703,21 @@ Whenever possible, ids should be used.
:command:`delete [{POS} | {START:END}]`
:command:`delete [{POS} | {START:END}]`
Deletes a song from the playlist.
Deletes a song from the playlist.
.. _command_deleteid:
:command:`deleteid {SONGID}`
:command:`deleteid {SONGID}`
Deletes the song ``SONGID`` from the
Deletes the song ``SONGID`` from the
playlist
playlist
.. _command_move:
:command:`move [{FROM} | {START:END}] {TO}`
:command:`move [{FROM} | {START:END}] {TO}`
Moves the song at ``FROM`` or range of songs
Moves the song at ``FROM`` or range of songs
at ``START:END`` [#since_0_15]_ to ``TO``
at ``START:END`` [#since_0_15]_ to ``TO``
in the playlist.
in the playlist.
.. _command_moveid:
:command:`moveid {FROM} {TO}`
:command:`moveid {FROM} {TO}`
Moves the song with ``FROM`` (songid) to
Moves the song with ``FROM`` (songid) to
``TO`` (playlist index) in the
``TO`` (playlist index) in the
...
@@ -669,6 +725,8 @@ Whenever possible, ids should be used.
...
@@ -669,6 +725,8 @@ Whenever possible, ids should be used.
is relative to the current song in the playlist (if
is relative to the current song in the playlist (if
there is one).
there is one).
.. _command_playlist:
:command:`playlist`
:command:`playlist`
Displays the queue.
Displays the queue.
...
@@ -676,10 +734,14 @@ Whenever possible, ids should be used.
...
@@ -676,10 +734,14 @@ Whenever possible, ids should be used.
Do not use this, instead use :ref:`playlistinfo
Do not use this, instead use :ref:`playlistinfo
<command_playlistinfo>`.
<command_playlistinfo>`.
.. _command_playlistfind:
:command:`playlistfind {TAG} {NEEDLE}`
:command:`playlistfind {TAG} {NEEDLE}`
Finds songs in the queue with strict
Finds songs in the queue with strict
matching.
matching.
.. _command_playlistid:
:command:`playlistid {SONGID}`
:command:`playlistid {SONGID}`
Displays a list of songs in the playlist.
Displays a list of songs in the playlist.
``SONGID`` is optional and specifies a
``SONGID`` is optional and specifies a
...
@@ -693,10 +755,14 @@ Whenever possible, ids should be used.
...
@@ -693,10 +755,14 @@ Whenever possible, ids should be used.
``SONGPOS`` or the range of songs
``SONGPOS`` or the range of songs
``START:END`` [#since_0_15]_
``START:END`` [#since_0_15]_
.. _command_playlistsearch:
:command:`playlistsearch {TAG} {NEEDLE}`
:command:`playlistsearch {TAG} {NEEDLE}`
Searches case-insensitively for partial matches in the
Searches case-insensitively for partial matches in the
queue.
queue.
.. _command_plchanges:
:command:`plchanges {VERSION} [START:END]`
:command:`plchanges {VERSION} [START:END]`
Displays changed songs currently in the playlist since
Displays changed songs currently in the playlist since
``VERSION``. Start and end positions may
``VERSION``. Start and end positions may
...
@@ -706,6 +772,8 @@ Whenever possible, ids should be used.
...
@@ -706,6 +772,8 @@ Whenever possible, ids should be used.
To detect songs that were deleted at the end of the
To detect songs that were deleted at the end of the
playlist, use playlistlength returned by status command.
playlist, use playlistlength returned by status command.
.. _command_plchangesposid:
:command:`plchangesposid {VERSION} [START:END]`
:command:`plchangesposid {VERSION} [START:END]`
Displays changed songs currently in the playlist since
Displays changed songs currently in the playlist since
``VERSION``. This function only
``VERSION``. This function only
...
@@ -731,6 +799,8 @@ Whenever possible, ids should be used.
...
@@ -731,6 +799,8 @@ Whenever possible, ids should be used.