paracusia v0.2.11 Paracusia.MpdClient.Playback
Functions related to MPD's playback.
See also: https://musicpd.org/doc/protocol/playback_commands.html and https://musicpd.org/doc/protocol/playback_option_commands.html
Link to this section Summary
Functions
Sets consume state to true or false
Sets crossfading between songs
Sets the threshold at which songs will be overlapped
Plays next song in the queue
Pauses or resumes playback
Continues playing the current song
Begins playing the queue at song songid
Begins playing the queue at the given position
Plays previous song in the queue
Sets random state to true or false
Sets repeat state to true or false
Sets the replay gain mode
Prints replay gain options. Currently, only the variable replay_gain_mode is returned
Seeks to the position seconds
within the current song
Seeks seconds
seconds backward within the current song
Seeks seconds
seconds forward within the current song
Seeks to the position seconds
of song id
Seeks the current song to percent
percent
Seeks to the position seconds
at entry songpos
in the queue
Sets volume to vol
(value between 0 and 100)
Sets single state to true or false
Stops playing
Changes volume by amount change
Link to this section Functions
consume(state)
consume(boolean()) :: :ok | Paracusia.MpdTypes.mpd_error()
consume(boolean()) :: :ok | Paracusia.MpdTypes.mpd_error()
Sets consume state to true or false.
crossfade(seconds)
crossfade(integer()) :: :ok | Paracusia.MpdTypes.mpd_error()
crossfade(integer()) :: :ok | Paracusia.MpdTypes.mpd_error()
Sets crossfading between songs.
mixrampdb(decibels)
mixrampdb(integer()) :: :ok | Paracusia.MpdTypes.mpd_error()
mixrampdb(integer()) :: :ok | Paracusia.MpdTypes.mpd_error()
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. In the absence of mixramp tags, crossfading will be used.
next()
next() :: :ok | Paracusia.MpdTypes.mpd_error()
next() :: :ok | Paracusia.MpdTypes.mpd_error()
Plays next song in the queue.
pause(bool)
pause(boolean()) :: :ok | Paracusia.MpdTypes.mpd_error()
pause(boolean()) :: :ok | Paracusia.MpdTypes.mpd_error()
Pauses or resumes playback.
play()
play() :: :ok | Paracusia.MpdTypes.mpd_error()
play() :: :ok | Paracusia.MpdTypes.mpd_error()
Continues playing the current song.
play_id(songid)
play_id(Paracusia.MpdTypes.id()) :: :ok | Paracusia.MpdTypes.mpd_error()
play_id(Paracusia.MpdTypes.id()) :: :ok | Paracusia.MpdTypes.mpd_error()
Begins playing the queue at song songid
.
play_pos(position)
play_pos(Paracusia.MpdTypes.position()) :: :ok | Paracusia.MpdTypes.mpd_error()
play_pos(Paracusia.MpdTypes.position()) :: :ok | Paracusia.MpdTypes.mpd_error()
Begins playing the queue at the given position.
previous()
previous() :: :ok | Paracusia.MpdTypes.mpd_error()
previous() :: :ok | Paracusia.MpdTypes.mpd_error()
Plays previous song in the queue.
random(state)
random(boolean()) :: :ok | Paracusia.MpdTypes.mpd_error()
random(boolean()) :: :ok | Paracusia.MpdTypes.mpd_error()
Sets random state to true or false.
repeat(state)
repeat(boolean()) :: :ok | Paracusia.MpdTypes.mpd_error()
repeat(boolean()) :: :ok | Paracusia.MpdTypes.mpd_error()
Sets repeat state to true or false.
replay_gain_mode(atom)
replay_gain_mode(:off | :track | :album | :auto) ::
:ok | Paracusia.MpdTypes.mpd_error()
replay_gain_mode(:off | :track | :album | :auto) :: :ok | Paracusia.MpdTypes.mpd_error()
Sets the replay gain mode.
Changing the mode during playback may take several seconds, because the new setting does not affect the buffered data.
replay_gain_status()
replay_gain_status() :: {:ok, String.t()} | Paracusia.MpdTypes.mpd_error()
replay_gain_status() :: {:ok, String.t()} | Paracusia.MpdTypes.mpd_error()
Prints replay gain options. Currently, only the variable replay_gain_mode is returned.
seek_current(seconds)
seek_current(number()) :: :ok | Paracusia.MpdTypes.mpd_error()
seek_current(number()) :: :ok | Paracusia.MpdTypes.mpd_error()
Seeks to the position seconds
within the current song.
seek_current_backward(seconds)
seek_current_backward(number()) :: :ok | Paracusia.MpdTypes.mpd_error()
seek_current_backward(number()) :: :ok | Paracusia.MpdTypes.mpd_error()
Seeks seconds
seconds backward within the current song.
seek_current_forward(seconds)
seek_current_forward(number()) :: :ok | Paracusia.MpdTypes.mpd_error()
seek_current_forward(number()) :: :ok | Paracusia.MpdTypes.mpd_error()
Seeks seconds
seconds forward within the current song.
seek_id(id, seconds)
seek_id(Paracusia.MpdTypes.id(), number()) ::
:ok | Paracusia.MpdTypes.mpd_error()
seek_id(Paracusia.MpdTypes.id(), number()) :: :ok | Paracusia.MpdTypes.mpd_error()
Seeks to the position seconds
of song id
.
seek_percent(percent)
seek_percent(number()) :: :ok | Paracusia.MpdTypes.mpd_error()
seek_percent(number()) :: :ok | Paracusia.MpdTypes.mpd_error()
Seeks the current song to percent
percent.
seek_pos(songpos, seconds)
seek_pos(Paracusia.MpdTypes.position(), number()) ::
:ok | Paracusia.MpdTypes.mpd_error()
seek_pos(Paracusia.MpdTypes.position(), number()) :: :ok | Paracusia.MpdTypes.mpd_error()
Seeks to the position seconds
at entry songpos
in the queue.
set_volume(vol)
set_volume(integer()) :: :ok | Paracusia.MpdTypes.mpd_error()
set_volume(integer()) :: :ok | Paracusia.MpdTypes.mpd_error()
Sets volume to vol
(value between 0 and 100).
single(state)
single(boolean()) :: :ok | Paracusia.MpdTypes.mpd_error()
single(boolean()) :: :ok | Paracusia.MpdTypes.mpd_error()
Sets single state to true or false.
stop()
stop() :: :ok | Paracusia.MpdTypes.mpd_error()
stop() :: :ok | Paracusia.MpdTypes.mpd_error()
Stops playing.
volume(change)
volume(integer()) :: :ok | Paracusia.MpdTypes.mpd_error()
volume(integer()) :: :ok | Paracusia.MpdTypes.mpd_error()
Changes volume by amount change
.
Note: the MPD command used by this function is deprecated, use set_volume/1
instead.