Command Reference

Complete reference for all mtrack command-line commands.

Player Commands

start

Start mtrack as a player process:

1
mtrack start /path/to/mtrack.yaml

Starts the player with the specified configuration file.

play-direct

Play a song directly without starting the full player:

1
mtrack play-direct [OPTIONS] <SONG_REPOSITORY> <SONG_NAME>

Options:

  • -d, --device <DEVICE>: Audio device name
  • -m, --midi-device <DEVICE>: MIDI device name
  • -s, --dmx-dim-speed <SPEED>: DMX dimming speed modifier
  • --dmx-universe-config <CONFIG>: DMX universe configuration (format: universe=1,name=light-show;universe=2,name=another)

Example:

1
mtrack play-direct -d UltraLite-mk5 click=1,cue=2 /mnt/songs "My Song"

Device Discovery

devices

List available audio devices:

1
mtrack devices

Output format:

Devices:
- DeviceName (Channels=22) (Alsa)

midi-devices

List available MIDI devices:

1
mtrack midi-devices

Output format:

Devices:
- DeviceName:PortName 14:0 (Input/Output)

Song Management

songs

List all songs in a repository:

1
mtrack songs <SONG_REPOSITORY>

Output includes:

  • Song names
  • Duration
  • Number of channels
  • Sample rate
  • MIDI message (if configured)
  • MIDI file (if configured)
  • Track names

songs –init

Generate default song configurations:

1
mtrack songs --init <SONG_REPOSITORY>

Creates a song.yaml file in each subdirectory using:

  • Folder name as song name
  • WAV files as tracks
  • MIDI files for MIDI playback
  • Files starting with dmx_ for light shows

gRPC Control Commands

These commands connect to a running mtrack player via gRPC.

play

Start playback:

1
mtrack play

Start from a specific time:

1
mtrack play --from "1:23.456"

stop

Stop playback:

1
mtrack stop

previous

Navigate to previous song:

1
mtrack previous

next

Navigate to next song:

1
mtrack next

switch-to-playlist

Switch between playlists:

1
2
mtrack switch-to-playlist all_songs
mtrack switch-to-playlist playlist

status

Get current player status:

1
mtrack status

active-effects

View all active lighting effects:

1
mtrack active-effects

cues

List all cues in the current song’s lighting timeline:

1
mtrack cues

System Commands

systemd

Generate a systemd service file:

1
mtrack systemd > /etc/systemd/system/mtrack.service

verify-light-show

Validate a light show file:

1
mtrack verify-light-show <LIGHT_SHOW_FILE>

Validate against configuration:

1
mtrack verify-light-show <LIGHT_SHOW_FILE> --config <CONFIG_FILE>

Global Options

–version

Show version information:

1
mtrack --version

–help

Show help for a command:

1
2
mtrack --help
mtrack <COMMAND> --help