I would read up on this
switch tutorial. If you are trying to make music turn on and off, do this:
Switch1 is cleared
Conditions to play music
---------
play music
wait actions, etc
current player brings at least 1 civilian to music off
---------
set switch1
Current player brings at least 1 civilian to music on
---------
clear switch1