Jump to content

Adding volta brackets to additional staves

From LilyPond wiki

The Volta_engraver by default resides in the Score context, and brackets for the repeat are thus normally only printed over the topmost staff. This can be adjusted by adding the Volta_engraver to the Staff context where the brackets should appear

\repeat and related commands should be present in all staves.

See also Volta brackets in multiple staves.

\version "2.24"

<<
  \new Staff {
    \repeat volta 2 { c'1
                     \alternative { \volta 1 { d' }
                                    \volta 2 { e' } } }
  }
  \new Staff {
    \repeat volta 2 { c'1
                     \alternative { \volta 1 { d' }
                                    \volta 2 { e' } } }
  }
  \new Staff \with { \consists "Volta_engraver" } {
    \repeat volta 2 { c'2 g'
                      \alternative { \volta 1 { d' a' } 
                                     \volta 2 { e' b' } } }
  }
  \new Staff {
    \repeat volta 2 { c'1
                     \alternative { \volta 1 { d' }
                                    \volta 2 { e' } } }
  }
>>