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

Link to this function

consume(state)
consume(boolean()) :: :ok | Paracusia.MpdTypes.mpd_error()

Sets consume state to true or false.

Link to this function

crossfade(seconds)
crossfade(integer()) :: :ok | Paracusia.MpdTypes.mpd_error()

Sets crossfading between songs.

Link to this function

mixrampdb(decibels)
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.

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.

Link to this function

previous()
previous() :: :ok | Paracusia.MpdTypes.mpd_error()

Plays previous song in the queue.

Sets random state to true or false.

Sets repeat state to true or false.

Link to this function

replay_gain_mode(atom)
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.

Link to this function

replay_gain_status()
replay_gain_status() :: {:ok, String.t()} | Paracusia.MpdTypes.mpd_error()

Prints replay gain options. Currently, only the variable replay_gain_mode is returned.

Link to this function

seek_current(seconds)
seek_current(number()) :: :ok | Paracusia.MpdTypes.mpd_error()

Seeks to the position seconds within the current song.

Link to this function

seek_current_backward(seconds)
seek_current_backward(number()) :: :ok | Paracusia.MpdTypes.mpd_error()

Seeks seconds seconds backward within the current song.

Link to this function

seek_current_forward(seconds)
seek_current_forward(number()) :: :ok | Paracusia.MpdTypes.mpd_error()

Seeks seconds seconds forward within the current song.

Seeks to the position seconds of song id.

Link to this function

seek_percent(percent)
seek_percent(number()) :: :ok | Paracusia.MpdTypes.mpd_error()

Seeks the current song to percent percent.

Link to this function

seek_pos(songpos, seconds)

Seeks to the position seconds at entry songpos in the queue.

Link to this function

set_volume(vol)
set_volume(integer()) :: :ok | Paracusia.MpdTypes.mpd_error()

Sets volume to vol (value between 0 and 100).

Sets single state to true or false.

Stops playing.

Changes volume by amount change.

Note: the MPD command used by this function is deprecated, use set_volume/1 instead.