Skip to content

Music Service

The music service allows you to play music (mp3 files as of now) via defined DCS-SRS channels.
It comes alongside the Music Plugin, which allows you to upload music, create playlists and configure which playlist should be played on which server and which frequency.

Configuration

To activate the Music Service, you need to add an optional plugin to your main.yaml first like so:

# config/main.yaml
opt_plugins:
  - music

As per usual, the Music service itself is configured with a yaml file in config/services/music.yaml.

# config/services/music.yaml
DEFAULT:
  music_dir: G:\My Drive\Music    # Directory where your music is (or where it is uploaded). For clusters, it should be a cloud drive like here.
  popup: Now playing {song} on {frequency}{modulation}  # optional - popup message when a song starts to play
  chat: Now playing {song} on {frequency}{modulation}   # optional - chat message when a song starts to play
  pause_without_players: false    # Pause music, when no player is active (default: true)
  debug: true                     # Put the output of DCS-SR-ExternalAudio.exe to the dcssb*.log
  radios:
    Radio 1:                      # Name of the radio, can be anything
      type: SRSRadio              # we currently only support SRS, so this has to be in
      mode: 1                     # mode 1 = repeat (at the end of the list), mode 2 = shuffle
      frequency: '30.0'           # channel where the music should be played
      modulation: FM              # modulation, AM or FM
      coalition: 1                # coalition 1 = red, 2 = blue, 3 = neutral
      volume: '0.5'               # 50% volume
      display_name: Jungle Beats  # Name of the radio as displayed in SRS
    Radio 2:                      
      type: SRSRadio              
      mode: 1                     
      frequency: '32.0'           
      modulation: FM              
      coalition: 2                
      volume: '0.5'               
      display_name: Rock & Pop     
You define unlimited radios per server, too.

Note

Please keep in mind that every radio runs a dedicated process on your server. If you run a lot of radios, that can
result in additional load, especially when a new song is decoded before playing.


Configuration reference

Key Type Description Example
DEFAULT map Applies to every instance.

DEFAULT

Key Type Description Example
DEFAULT.music_dir str Directory that holds your music files. (range: min 1) G:\Music
DEFAULT.popup str Popup when a song starts; holds {song}, {frequency}, {modulation}. (range: min 1) Now playing {song} on {frequency}{modulation}
DEFAULT.chat str Chat message when a song starts; holds {song} and {frequency}. (range: min 1) Now playing {song} on {frequency}{modulation}
DEFAULT.pause_without_players bool Pause the music while no player is online. true
DEFAULT.debug bool Write the DCS-SR-ExternalAudio output to the bot log. false
DEFAULT.radios map One entry per radio, keyed by the radio's name. Radio 1:
type: SRSRadio
mode: 1
frequency: '30.0'
modulation: FM
coalition: 1
volume: '0.5'
display_name: Jungle Beats
DEFAULT.radios.<(.+)> map
DEFAULT.radios.<(.+)>.type str (required) Radio type. Only SRSRadio is supported. (one of: SRSRadio) SRSRadio
DEFAULT.radios.<(.+)>.mode int (required) Playback mode, 1 repeats the list, 2 shuffles it. (one of: 1, 2) 1
DEFAULT.radios.<(.+)>.frequency text (required) SRS channel the music is played on. 30.0
DEFAULT.radios.<(.+)>.modulation str (required) Radio modulation. (one of: AM, FM) FM
DEFAULT.radios.<(.+)>.coalition int (required) Coalition this radio is played for. (one of: 1, 2) 1
DEFAULT.radios.<(.+)>.volume text Playback volume between 0.0 and 1.0. 0.5
DEFAULT.radios.<(.+)>.display_name str Name of this radio as displayed in SRS. (range: min 1) Jungle Beats
DEFAULT.radios.<(.+)>.startup_wait float Seconds a track waits for SRS to be up before the attempt is given up. 60
DEFAULT.radios.<(.+)>.popup str Popup for this radio, overrides the global one. (range: min 1) Now playing {song}
DEFAULT.radios.<(.+)>.chat str Chat message for this radio, overrides the global one. (range: min 1) Now playing {song}

<(.+)>

Key Type Description Example
<(.+)> any (one of: element_schema, instance_schema)