lilypond-user
[Top][All Lists]
Advanced

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

Re: Key change with clef after the bar line?


From: Jean Abou Samra
Subject: Re: Key change with clef after the bar line?
Date: Wed, 2 Mar 2022 07:29:22 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0


Le 01/03/2022 à 23:51, Alasdair a écrit :

Dear Jean,

I have just had time to make that change (of key to key-signature).  However, there is still an issue.  For example, in change from g major to g minor, we go from one sharp to two flats.  As I have a key signature in the middle of a bar (after a “Fine”), my current bar looks like this:

g4^\markup \fontsize #2 \italic "Fin" \bar "||" \set Staff.forceClef = ##t  \key g \minor d8 |

However, what happens is that the natural sign is printed on top of the double bar line.  So either I need to not print the natural (which would be my preference), or somehow push the entire new key signature (one natural and two flats) after the clef sign.

Note that I’m not interested in modern best practice, but I want to (with modern music printing) maintain the spirit of the 18^th century manuscript.



The naturals are printed by a KeyCancellation grob, which has
break-align-symbol 'key-cancellation
(https://lilypond.org/doc/v2.23/Documentation/internals/keycancellation).
When overriding the order, you have not told LilyPond where to
put it. Just add key-cancellation to the vector before
key-signature.

\version "2.22.1"

\language english

global = {
  \clef treble
  \time 4/4
  \override Score.BreakAlignment.break-align-orders =
  #(make-vector 3 '(span-bar
                    breathing-sign
                    staff-bar
                    clef
                    key-cancellation
                    key-signature
                    time-signature))
}

\relative c' {
  \global
  \key g \major
  c4 d e fs |
  g a
  \bar "||"
  \set Staff.forceClef = ##t
  \key c \minor
  bf c |
  bf af g f |
  ef d c2
}


Best,
Jean






reply via email to

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