Meson Player

Control commands

If Meson Player is running then you can pass some commands or filenames to it. The whole process goes like this:

  1. Ensure that Meson Player is already running (let's call it instance A);
  2. Launch another instance of Meson Player (B) and pass commands/filenames via command line.
  3. B will pass commands/filenames to A;
  4. A may return some data back to B, in that case B will output that data to stdout.
  5. B will shut down itself.

You can pass either one control command (see the list below) or some of the following (in any order and/or quantity):

Control commands have a format --cmd-<command-name>. Note, that if you pass a control command then it should be the only command line argument passed to Meson Player.

The way you execute these control commands depends on a platform:

You want to execute get-volume command. Depending on OS you do something like this:

Below is a list of control commands in alphabetical order.


get-all

Returns: all available information that can be gathered from other get-* commands.

user@localhost:~/mesonplayer $ ./mesonplayer --cmd-get-all position: 26.37 real-position: 2927.45 duration: 273.12 full-duration: 3996.12 index: 12 count: 16 state: playing playback-mode: all_loop formatted-title: Machinae Supremacy - The Bigger They Are The Harder They Fall title: The Bigger They Are The Harder They Fall artist: Machinae Supremacy filename: /home/user/music/Machinae Supremacy/Phantom Shadow.flac full-filename: /home/user/music/Machinae Supremacy/Phantom Shadow.cue:12 volume: 20 master-volume: 12.00 user@localhost:~/mesonplayer $

get-title

Returns: track artist based on information from tags (therefore may return nothing).


get-count

Returns: total file count in a current playlist.


get-duration

Returns: current track duration in seconds as a floating point value (i.e. 652.40).


get-filename

Returns: current filename.


get-formatted-title

Returns: formatted track title as it's shown on the tooltip.


get-full-duration

Returns: same as get-duration, but returns a duration of a current file instead of a current track (this can make a difference for CUE-splitted files or Internet-radio).


get-full-filename

Returns: same as get-filename, but for CUE-splitted files returns *.cue filename with :n appended, where n is a track's zero-based index inside a corresponding CUE file (i.e. /home/user/file.cue:3).


get-index

Returns: current track index in playlist (or -1 case no music files loaded).


get-master-volume

Returns: current system-wide sound volume level as a float value in a range of [0;100] (i.e. 13.37).


get-playback-mode

Returns: playback mode (track_once, all_once, track_loop, all_loop or random).


get-position

Returns: current track position in seconds as a floating point value (i.e. 23.14).


get-real-position

Returns: same as get-position, but returns actual position in stream which may not match a current track position (this may be the case for CUE-splitted files and Internet-radio streams).


get-state

Returns: playback state (idle, paused or playing).


get-title

Returns: track title based on information from tags (therefore may return nothing).


get-volume

Returns: current sound volume level as an integer value in a range of [0;100] (i.e. 42).


next

Play a next track.

Returns: all available information. See get-all command for details.


open-next

Open a next track but do not play.

Returns: all available information. See get-all command for details.


open-prev

Open a previous track but do not play.

Returns: all available information. See get-all command for details.


pause

Pause playback.


play

Play (or restart) current track.


prev

Play a previous track.

Returns: all available information. See get-all command for details.


quit

Quit the application.


seek-back

Rewind by 1% of the track duration.

Returns: current track position. See get-position command for details.


seek-forward

Fast-forward by 1% of the track duration.

Returns: current track position. See get-position command for details.


stop

Stop playback.


toggle-pause

If a track is paused/stopped then continue/start playback, else pause playback.

Returns: current playback state (idle, paused or playing).


toggle-play

If a track is paused/stopped then continue/start playback, else stop playback.

Returns: current playback state (idle, paused or playing).


volume-down

Lower sound volume down. Volume step can be set via volume-step parameter.

Returns: resulting sound volume in range of [0;100].


volume-up

Raise sound volume up. Volume step can be set via volume-step parameter.

Returns: resulting sound volume in range of [0;100].