Jump to content

Making cross-staff beams look better: Difference between revisions

From LilyPond wiki
No edit summary
Improve
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
Cross-staff beams may not look always good; this snippet demonstrates how to get better results.
Cross-staff beams might be very steep, which can be ugly sometimes.  This snippet demonstrates how to change that.
 
<lilypond version="2.24" full>
%% http://lsr.di.unimi.it/LSR/Item?id=508
 


<lilypond version="2.24">
\score {
\score {
   \new PianoStaff <<
   \new PianoStaff <<
Line 11: Line 8:
   \context Staff = LH
   \context Staff = LH
     \relative c' {
     \relative c' {
     \stemDown % Change into \stemUp to fix the bug
     \stemDown
     c,8 [ g'
     c,8 [ g'
    \change Staff = RH
      \change Staff = RH
    d' a' e' b' ]
      d' a' e' b' ] |
    % This makes the second beam look much better.
     \override Beam.concaveness = #1
     \override Beam.concaveness = #0
     b [ e, a, d,
     b [ e, a, d,
    \change Staff = LH
      \change Staff = LH
    g, c, ]
      g, c, ] |
   }
   }
   >>
   >>
Line 26: Line 22:
% Prevent bad cropping.
% Prevent bad cropping.
\markup \null
\markup \null
\paper { tagline = ##f }
</lilypond>
</lilypond>


[[Category:Keyboards]]
[[Category:Keyboards]]
[[Category:Workaround]]
[[Category:Workaround]]
[[Category:Version-specific]][[Category:Snippet]]
[[Category:Version-specific]]
[[Category:Snippet]]

Latest revision as of 08:10, 11 March 2026

Cross-staff beams might be very steep, which can be ugly sometimes. This snippet demonstrates how to change that.

\version "2.24"

\score {
  \new PianoStaff <<
   \new Staff = "RH" { \clef treble \time 3/4 s2.*2 }
   \new Staff = "LH" { \clef bass   \time 3/4 s2.*2 }
   \context Staff = LH
    \relative c' {
     \stemDown
     c,8 [ g'
       \change Staff = RH
       d' a' e' b' ] |
     \override Beam.concaveness = #1
     b [ e, a, d,
       \change Staff = LH
       g, c, ] |
   }
  >>
}

% Prevent bad cropping.
\markup \null