Command list
============
When mus_player's -i option is used, a UNIX domain socket is created to receive
and reply to commands. To fill the glaring hole in the POSIX toolset, the
little mus_udsend program is included to communicate with such sockets.
Here are the accepted commands and their semantics:
STATUS
Returns a list following this format:
status playing|paused|quitting
path /...
format nb_channels # sample_rate # bit_depth # bit_rate #
duration HH:MM:SS
position HH:MM:SS
tag TITLE ...
tag ARTIST ...
tag ALBUMARTIST ...
tag DATE ...
tag ALBUM ...
tag TRACKNUMBER ...
tag TRACKTOTAL ...
tag DISCNUMBER ...
tag DISCTOTAL ...
tag DISCTITLE ...
tag REPLAYGAIN_TRACK_GAIN ...
tag REPLAYGAIN_TRACK_PEAK ...
tag REPLAYGAIN_ALBUM_GAIN ...
tag REPLAYGAIN_ALBUM_PEAK ...
tag lines will be output only for present tags.
PLAY
Resume play if the player is paused, do nothing otherwise.
PAUSE
Pause the player if it is playing, do nothing otherwise.
TOGGLE_PLAY_PAUSE
Resume play if the player is paused and pause the player if it is playing.
QUIT
Terminate the player. Can be used when paused.
TRACK_NEXT
Skip the current track. Will cause the player to quit if used on the last
track.
TRACK_PREV
Play the previous song in the queue again. Will rewind the current track if
used on the first track.
TRACK_REWIND
Seek to the beginning of the current track.
TRACK_FIRST
Start over from the first track.
All the commands except STATUS return the string "OK".
Example
=======
$ mus_player -i sock -q ~/'Music/Paradise Lost/(1991) Gothic/01. Gothic.flac' &
$ mus_udsend sock STATUS
status playing
path /home/Paul/Data/Music/Paradise Lost/(1991) Gothic/01. Gothic.flac
format nb_channels 2 bit_depth 16 sample_rate 44100 bit_rate 825k
duration 00:04:51
position 00:00:05
tag TITLE Gothic
tag ARTIST Paradise Lost
tag ALBUMARTIST Paradise Lost
tag ALBUM Gothic
tag DATE 1991
tag TRACKNUMBER 01
tag TRACKTOTAL 10
tag REPLAYGAIN_TRACK_GAIN -2.250000
tag REPLAYGAIN_TRACK_PEAK 0.788141
tag REPLAYGAIN_ALBUM_GAIN -2.100000
tag REPLAYGAIN_ALBUM_PEAK 0.999817
$ mus_udsend sock PAUSE
OK
$ mus_udsend sock PLAY
OK
$ mus_udsend sock QUIT