This is actually a repeat of a 20 year old question that I never found an answer to:
I'm trying to get something like this:
|--------------||--------------||--------------
|: Notes1 | Alternative1 :| Alternative2 || Alternative3 |. Notes2...
The problem I'm facing is that the right side of the second volta bracket is open as soon as I'm changing the bar line after the second alternative to "|.|" using the \bar command.
Here is my test case:
\version "2.24.0"
voltaToVerse = \markup { 2. \text \italic { to verse } }
voltaFine = \markup { \text \bold { Final. } }
\relative {
f''4 g a b
\set Score.repeatCommands = #'((volta "1."))
c1
\bar ":|."
\set Score.repeatCommands = #(list(list 'volta voltaToVerse))
c1
\bar "|.|"
\set Score.repeatCommands = #(list(list 'volta voltaFine))
c1
\bar ".."
\set Score.repeatCommands = #'((volta #f))
}
Any hints how to force the volta brackets to be closed on the 2nd ending are welcome.