Jump to content

Volta brackets in multiple staves: Difference between revisions

From LilyPond wiki
No edit summary
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
By adding the <code>Volta_engraver</code> to the relevant staff, volte can be put over staves other than the topmost one in a score.
By adding the <code>Volta_engraver</code> to the relevant staff, volte can be put over staves other than the topmost one in a score.
<code>\repeat</code> and related commands should be present in all staves.


<lilypond version="2.24">
<lilypond version="2.24">
Line 25: Line 27:
</lilypond>
</lilypond>


[[Category:Repeats]]
[[Category:Contexts and engravers]]
[[Category:Really simple]]
[[Category:Repeats]]
[[Category:Repeats]]
[[Category:Staff notation]]
[[Category:Staff notation]]
[[Category:Included in the official documentation]]
[[Category:Included in the official documentation]]
[[Category:Really simple]][[Category:Snippet]]
[[Category:Snippet]]

Latest revision as of 09:00, 4 December 2025

By adding the Volta_engraver to the relevant staff, volte can be put over staves other than the topmost one in a score.

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

\version "2.24"

voltaMusic = \relative c'' {
  \repeat volta 2 {
    c1
    \alternative {
      \volta 1 { d1 }
      \volta 2 { e1 }
    }
  }
}

<<
  \new StaffGroup <<
    \new Staff \voltaMusic
    \new Staff \voltaMusic
  >>
  \new StaffGroup <<
    \new Staff \with { \consists "Volta_engraver" }
      \voltaMusic
    \new Staff \voltaMusic
  >>
>>