Jump to content

Staff brackets: Difference between revisions

From LilyPond wiki
No edit summary
m New category
Tags: Mobile edit Mobile web edit
 
Line 45: Line 45:
[[Category:Preparing parts]]
[[Category:Preparing parts]]
[[Category:Syntax and expressions]]
[[Category:Syntax and expressions]]
[[Category:Contexts and engravers]][[Category:Snippet]]
[[Category:Contexts and engravers]]
[[Category:Snippet]]

Latest revision as of 23:27, 21 November 2025

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"

%% 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 
  }
}