Jump to content

Volta brackets in multiple staves: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m Replace version="2.24.0" with version="2.24" now that the LilyWiki extension supports auto-selecting the latest release in a stable series
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.


<lilypond version="2.24.0">
<lilypond version="2.24">
voltaMusic = \relative c'' {
voltaMusic = \relative c'' {
   \repeat volta 2 {
   \repeat volta 2 {

Revision as of 18:56, 16 November 2025

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

\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
  >>
>>