Jump to content

Staff brackets: Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
m New category
Tags: Mobile edit Mobile web edit
 
(2 intermediate revisions by 2 users not shown)
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


Line 46: Line 46:
[[Category:Syntax and expressions]]
[[Category:Syntax and expressions]]
[[Category:Contexts and engravers]]
[[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 
  }
}