lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Workaround for issue 6307


From: Jean Abou Samra
Subject: Re: Workaround for issue 6307
Date: Fri, 8 Apr 2022 22:01:54 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0

Le 08/04/2022 à 21:54, Knute Snortum a écrit :
Hi everyone.

I am looking for a workaround for issue 6307 [1].  Under some
circumstances, the stems of a beamed series of notes do not reach all
the way down to the beam.  I've tried several different ways to
correct this, but without success. Any help would be appreciated.

%%%%%
\version "2.22.2"

\new Staff \with { \magnifyStaff #2/3 }
{
   \relative c'' {
     \tuplet 3/2 {
       %%% Below corrects beam thickness
       \once \override Beam.beam-thickness = 0.25

       %%% Below changes the stem lengths, but the beam
       %%% still "shies away" from the bottom of the stem.
       % \once \override Stem.details.beamed-lengths = #'(3 3 3)

       %%% Below changes the beam position, but the stems
       %%% still shy away from the beam.
       % \once \override Beam.positions = #'(-1.5 . -2)
       d8 c b
     } \stopStaff \grace { s8 } s4
   }
}
%%%%%

[1] https://gitlab.com/lilypond/lilypond/-/issues/6307



Probably

\version "2.22.2"

\layout {
  \context {
    \Staff
    \consists
      #(lambda (context)
         (let ((beam #f)
               (staff-symbol #f))
           (make-engraver
            (acknowledgers
             ((beam-interface engraver grob source-engraver)
              (set! beam grob))
             ((staff-symbol-interface engraver grob source-engraver)
              (set! staff-symbol grob)))
            ((stop-translation-timestep engraver)
             (if (and beam staff-symbol)
                 (ly:grob-set-object! beam 'staff-symbol staff-symbol))
             (set! beam #f)))))
  }
}

\new Staff \with { \magnifyStaff #2/3 }
{
  \relative c'' {
    \tuplet 3/2 {
      d8 c b
    } \stopStaff \grace { s8 } s4
  }
}

Beams are created in a delayed manner, one 'time step' later than their
last note. Grobs are given staff symbols at the point they are
created. If you end the staff symbol right after the beam, this logic
gets defeated.

Jean





reply via email to

[Prev in Thread] Current Thread [Next in Thread]