Dear Aleksa,

This is something I work on a lot as well, as I obsess with making my engravings look like published editions too. Here's what I've found so far:

Your first problem can simply be fixed by modifying Beam.damping, see https://wiki.lilypond.community/index.php?title=Controlling_beam_damping&oldid=4930 (also attached here)

For your second problem, I use a snippet created by Jean Abou Samra (I can search for the email in this list if you like) that whites out the area behind the beam.

With these two changes, combined with changing the beams to be more thick and closer together, I get beams that are really beautifully engraved to my eyes and leave nothing to be desired with respect to looking more professional.

(I haven't encountered the third problem or tried fixing it)

Take a look at the attached file beams_example.ly, and let me know if that helps accomplish what you were hoping for.

Thanks,
-William

On 12/10/25 10:36 PM, A Jakovljevic wrote:
Hi all,

While Lilypond tends to do a very good job in most cases, there are two issues which seem to be recurring a fair bit in the music I'm typesetting:
-beam angles being too steep
-beams crossing staff lines (which is a style choice, arguably, but usually avoided by the better publisher out there) -in a few rare cases, an angled beam starting or ending in a space (this is generally frowned upon, cf. Gould, p. 17f)

Both of these can be arguably rather easily be fixed with manual overrides (fyi, if necessary: the syntax is \once \override Beam.positions = #'(-3 . -2.75) , numbers adjusted as needed); but of course that takes time, makes for pretty unreadable code post facto, and is in fact one of the most frequent and few things I have to fix manually, so if it were at all possible to make beams shallower by default that would be a huge time saver.

I don't know enough about the internals to know where even to look at for something like this (it is at least independent of notation font as far as I can test out). If I may mention it, I've seen something similar discussed regarding another open-source software here [https:// musescore.org/en/node/152276 <https://musescore.org/en/node/152276>] (with reference to how one of the other WYSIWYG options allows to set defaults for it, scroll down a bit).

As an example, here are the first few bars of the 1st violon part from KV 418:

\version "2.24.4"

\language "deutsch"

\score {
<<
\new Staff {
\key a \major \time 2/2
\relative c'' {
r2^"Default" r8 cis16.[( e32] a8[) a-.] |
a4 r r8 e16.[( a32] cis8[) cis-.] |
cis4 r r2 | r r8 d,16.[( fis32] h8[) h-.] |
h4 r r8 f16.[( h32] d8[) d-.] |
}
}

\new Staff {
\key a \major \time 2/2
\relative c'' {
r2^"Manual fix" r8 \once \override Beam.positions = #'(-3 . -2.75) cis16.[( e32] a8[) a-.] | a4 r r8 \once \override Beam.positions = #'(-2.25 . -2) e16.[( a32] cis8[) cis-.] | cis4 r r2 | r r8 \once \override Beam.positions = #'(-2.25 . -2) d,16. [( fis32] h8[) h-.] | h4 r r8 \once \override Beam.positions = #'(-1.25 . -1) f16.[( h32] d8[) d-.] |
}
}
 >>
}

You can of course compare with the old Breitkopf offering on IMSLP; the more recent Neue Mozart Ausgabe is very similar to that and both match the manual fixes I have applied:
image.png

Cheers,

Aleksa Jakovljevic,
harpsichordist / organist / musicologist
Montreal, Quebec, Canada
\version "2.24"

% Source: 
https://wiki.lilypond.community/index.php?title=Controlling_beam_damping&oldid=4930

%% http://lsr.di.unimi.it/LSR/Item?id=375

%LSR contributed by James Lowe, after 
http://lists.gnu.org/archive/html/lilypond-user/2008-11/msg00629.html

notes = {
  \repeat unfold 5 { f,16 e' d' c' }
  \repeat unfold 5 { a16 c, e, c }
  \repeat unfold 5 { b16 f' c' g' }
  \repeat unfold 5 { d,16 g c f }
  \repeat unfold 5 { e,16 g b d }
  \repeat unfold 5 { g,16 a b c }
  \repeat unfold 5 { \stemDown d,16 a' e' b' }
}

damping = \repeat unfold 7 {
  %% default beam damping is 1:
  \override Beam.damping = #1 s4^"1 (def.)"
  \override Beam.damping = #2 s^"2"
  \override Beam.damping = #4 s^"4"
  \override Beam.damping = #-3 s^"-3"
  \override Beam.damping = #+inf.0 s^"+inf.0"
}

\score {
  \relative c' {
    \time 5/4
    \override Staff.TimeSignature.stencil = ##f
    <<
      \notes
      \damping
    >>
  }
  \layout {
    indent = #0
    system-count = #7
    ragged-right = ##t
  }
}
\version "2.25.28"

\layout {
  \context {
    \Voice
    \override Beam.damping = #4
  }

#(use-modules (ice-9 match) (srfi srfi-1))

\context {
  % This beam whiteout stencil is written by Jean Abou Samra
  % Temporary solution to whiteout stave lines inbetween beams
  % To avoid collision
    \Score
    \override Beam.stencil = #(grob-transformer
        'stencil
        (lambda (grob orig)
          (define (sanitize lst)
            (filter (match-lambda ((x . y) (and (finite? x) (finite? y))))
                    lst))
          (match-let* (((down . up) (ly:skylines-for-stencil orig X))
                       (down-points (sanitize (ly:skyline->points down X)))
                       (up-points (sanitize (ly:skyline->points up X))))
            (ly:stencil-add
             (stencil-with-color
              (ly:round-polygon
               (append-reverse down-points up-points)
               0.0)
              "white")
             orig))))
    \override Stem.layer = 10
  }
}

\language "deutsch"
\score {
<<
\new Staff {
\key a \major \time 2/2
\relative c'' {
r2^"Default" r8 cis16.[( e32] a8[) a-.] |
a4 r r8 e16.[( a32] cis8[) cis-.] |
cis4 r r2 | r r8 d,16.[( fis32] h8[) h-.] |
h4 r r8 f16.[( h32] d8[) d-.] |
}
}
>>
}

Reply via email to