Jump to content

Staff brackets

From LilyPond wiki
Revision as of 22:35, 26 October 2025 by Jean Abou Samra (talk | contribs) (Import snippet from LSR)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Staffs can be nested in various combinations. Here, StaffGroup and ChoirStaff produce similar straight brackets, whereas GrandStaff produces curly brackets. In InnerStaffGroup and InnerChoirStaff, the brackets are shifted leftwards.

\version "2.24.0"

%% http://lsr.di.unimi.it/LSR/Item?id=137

myMusic = { c' d' e' f' }

\score { 
  <<
    \new StaffGroup << 
      \new Staff \myMusic
      \new StaffGroup <<
        \new Staff \myMusic
        \new GrandStaff <<
          \new Staff \myMusic
          \new Staff \myMusic
        >>
        \new Staff \myMusic
      >>
      \new ChoirStaff <<
        \new Staff \myMusic
        \new StaffGroup <<
          \new Staff \myMusic
        >>
        \new Staff \myMusic
      >>
    >>
    \new ChoirStaff << 
      \new Staff \myMusic
      \new ChoirStaff <<
        \new Staff \myMusic
        \new Staff \myMusic
      >>
      \new Staff \myMusic
    >>
  >>
  \layout { 
    raggedright = ##t 
  }
}