Jump to content

Adding an extra staff (2): Difference between revisions

From LilyPond wiki
Import snippet from LSR
 
mNo edit summary
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
To add an extra staff after the start of a piece, you can choose between having brackets or braces when you go over a new line:<br />
To add an extra staff after the start of a piece, you can choose between having brackets or braces when you go over a new line:<br />
=&gt; Use '''<code>PianoStaff</code>''' instead of <code>StaffGroup</code> or <code>ChoirStaff</code> in the code.
Use '''<code>PianoStaff</code>''' instead of <code>StaffGroup</code> or <code>ChoirStaff</code> in the code.


You may wish to remove the clef and not only the key:<br />
You may wish to remove the clef and not only the key:<br />
=&gt; See both '''<code>\override</code>'''s in the code.
See both '''<code>\override</code>'''s in the code.


You may wish to remove also the little part of staff at the beginning of the extra staff:<br />
You may wish to remove also the little part of staff at the beginning of the extra staff:<br />
=&gt; Use '''<code>#'stencil = ##f</code>''' instead of <code>#'transparent = ##t</code> for ''both'' <code>\override</code>s.<br />
Use '''<code>#'stencil = ##f</code>''' instead of <code>#'transparent = ##t</code> for ''both'' <code>\override</code>s.<br />
If you want to keep the little beginning of staff, keep at least one <code>#'transparent = ##t</code>.
If you want to keep the little beginning of staff, keep at least one <code>#'transparent = ##t</code>.


<lilypond version="2.24.0" full>
<lilypond version="2.24">
%% http://lsr.di.unimi.it/LSR/Item?id=707
 
% snippet starts here:
 
\markup { Example 1 }
\markup { Example 1 }


Line 52: Line 48:
   }
   }
}
}
\paper { tagline = ##f }
</lilypond>
</lilypond>


[[Category:Staff notation]]
[[Category:Staff notation]]
[[Category:Contexts and engravers]]
[[Category:Contexts and engravers]]
[[Category:Really simple]]
[[Category:Simultaneous notes]]
[[Category:Simultaneous notes]]
[[Category:Really simple]]
[[Category:Staff notation]]
[[Category:Snippet]]

Latest revision as of 07:50, 5 December 2025

To add an extra staff after the start of a piece, you can choose between having brackets or braces when you go over a new line:
⇒ Use PianoStaff instead of StaffGroup or ChoirStaff in the code.

You may wish to remove the clef and not only the key:
⇒ See both \overrides in the code.

You may wish to remove also the little part of staff at the beginning of the extra staff:
⇒ Use #'stencil = ##f instead of #'transparent = ##t for both \overrides.
If you want to keep the little beginning of staff, keep at least one #'transparent = ##t.

\version "2.24"

\markup { Example 1 }

\score {
  \new StaffGroup \relative c'' {
    c1 | c | c^"extra staff with staff beginning"
    <<
      {
        c1 | c | \break
        c1^"new system with brackets" | c
      }
      \new Staff {
        \once \override Staff.TimeSignature.transparent = ##t
        \once \override Staff.Clef.transparent = ##t
        e1 | e | e | e
      }
    >>
    c1 | c | c | c
  }
}

\markup { Example 2 }
\score {
  \new PianoStaff \relative c'' {
    c1 | c | c^"clean beginning of extra staff"
    <<
      {
        c1 | c | \break
        c1^"new system with braces" | c
      }
      \new Staff {
        \once \override Staff.TimeSignature.stencil = ##f
        \once \override Staff.Clef.stencil = ##f
        e1 e e e
      }
    >>
    c1 | c | c | c
  }
}