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:
Returns a list following this format:
format nb_channels # sample_rate # bit_depth # bit_rate #
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.
Resume play if the player is paused, do nothing otherwise.
Pause the player if it is playing, do nothing otherwise.
Resume play if the player is paused and pause the player if it is playing.
Terminate the player. Can be used when paused.
Skip the current track. Will cause the player to quit if used on the last
Play the previous song in the queue again. Will rewind the current track if
used on the first track.
Seek to the beginning of the current track.
Start over from the first track.
All the commands except STATUS return the string "OK".
$ mus_player -i sock -q ~/'Music/Paradise Lost/(1991) Gothic/01. Gothic.flac' &
$ mus_udsend sock STATUS
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
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
$ mus_udsend sock PLAY
$ mus_udsend sock QUIT