I've tried to combine using color and bar types without success.

This results in 1 unwanted colored bar line, 3 warnings, and no volta 2 note:
(1) The bar before the break has an orange color, not the standard color.
(2) warning: More alternatives than repeats.  Junking excess alternatives.
(3) warning: More alternatives than repeats.  Junking excess alternatives
(4) warning: missing volta specification on alternative element.
(5) The volta 2 doesn't show in the output.

I may need to use a different version of LilyPond to achieve the expected result, but regardless, how does one combine multiple BarLine colors and RepeatBarTypes for a successful compile without warnings?

Here's my MWE:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\version "2.24.0"

ColorRepeatBegSpecialBar = {
 \once \override Score.BarLine.color = #(x11-color 'orange)
 \once \set Score.startRepeatBarType = #"[|:"
}
ColorRepeatEndSpecialBar = {
 \once \override Score.BarLine.color = #(x11-color 'orange)
 \once \set Score.endRepeatBarType = #":|]"
}

Music = {
 b'1
 \break % to show colored bar line
 \ColorRepeatBegSpecialBar
 \repeat volta 2 {
  c''1 |
 }
 \alternative {
  \volta 1 {
   d''1 |
  }
  \ColorRepeatEndSpecialBar
  \volta 2 {
   e''1 |
  }
 }
}

\score {
  \new Staff { \Music }
}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

Reply via email to