Jump to content

Staff brackets: 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:
Staffs can be nested in various combinations. Here, <code>StaffGroup</code> and <code>ChoirStaff</code> produce similar straight brackets, whereas <code>GrandStaff</code> produces curly brackets. In <code>InnerStaffGroup</code> and <code>InnerChoirStaff</code>, the brackets are shifted leftwards.
Staffs can be nested in various combinations. Here, <code>StaffGroup</code> and <code>ChoirStaff</code> produce similar straight brackets, whereas <code>GrandStaff</code> produces curly brackets. In <code>InnerStaffGroup</code> and <code>InnerChoirStaff</code>, the brackets are shifted leftwards.


<lilypond version="2.24.0">
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=137
%% http://lsr.di.unimi.it/LSR/Item?id=137



Revision as of 18:52, 16 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 
  }
}