lilypond-user
[Top][All Lists]
Advanced

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

Re: Key Signature Bug in 2.24.0,Re: Key Signature Bug in 2.24.0


From: Jean Abou Samra
Subject: Re: Key Signature Bug in 2.24.0,Re: Key Signature Bug in 2.24.0
Date: Fri, 13 Jan 2023 12:09:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0

Le 13/01/2023 à 10:16, Werner LEMBERG a écrit :
I just discovered this huge bug in the recent release of 2.24.0
which wasn't in the previous version.
What previous version did you test this with? For me, the output is
the same in 2.22 and in 2.18.2.
Regardless of that, it is indeed a severe bug: No need to ever align
key signatures vertically, AFAIK.  Simply left-align them.


Do you mean like this, or something else?

(NB this is unreliable code, I was surprised that it even works)

\version "2.24.0"

music = \relative c' {
  \override Staff.KeyCancellation.break-align-symbol = #'key-signature
  \override Staff.KeySignature.X-offset =
    #(lambda (grob)
       (let* ((parent (ly:grob-parent grob X))
              (elts (ly:grob-object parent 'elements))
              (can (find (lambda (g)
                           (and (grob::has-interface g 'key-cancellation-interface)
                                (eq? (ly:grob-object g 'staff-symbol)
                                     (ly:grob-object grob 'staff-symbol))))
                         (ly:grob-array->list elts))))
         (when can
           (ly:grob-translate-axis!
            grob
            (+ (- (interval-end (ly:grob-extent can parent X))
                  (ly:grob-relative-coordinate grob parent X))
               0.7)
            X))))
  \key es\major
  c d e f
  \key c\major
  c d e f
  \key as\major
  c d e f
  \key bes\major
  c d e f
}

\new StaffGroup <<
  \transpose c a {
    \music
  }
  \new Staff
  \transpose c g {
    \music
  }
  \new Staff
    \music
>>


Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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