Repeats with parallelMusic

Sometimes for short polyphonic pieces – and to make the source more readable –, it can be helpful to use \parallelMusic.

Troubles come with repeats that should be entered as

\parallelMusic #'(voiceA voiceB) {
  \repeat volta 2 { mes.1 mes.2 ... mes.n } |
  \repeat volta 2 { mes.1 mes.2 ... mes.n } |
}

so the code becomes less readable and the use of \parallelMusic less understandable.

This snippet is a workaround that shows another way to write repeats in \parallelMusic mode by simply adding a bar at the end of the score.

It also handles the wanted repeats in the midi output.