Jump to content

Removing connecting bar lines on StaffGroup, PianoStaff, or GrandStaff

From LilyPond wiki
(Redirected from LSR 686)

By default, bar lines in StaffGroup, PianoStaff, or GrandStaff contexts are connected between the staves, i.e., a span bar is printed. This behaviour can be overridden on a staff-by-staff basis.

\version "2.24"

\relative c' { 
  \new StaffGroup <<
    \new Staff {
      e1 | e
      \once \override Staff.BarLine.allow-span-bar = ##f
      e1 | e | e
    }
    \new Staff {
      c1 | c | c
      \once \override Staff.BarLine.allow-span-bar = ##f
      c1 | c
    }
    \new Staff {
      a1 | a | a | a | a
    }
  >>
}