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: Alasdair McAndrew
Subject: Re: Key change with clef after the bar line?
Date: Sun, 27 Feb 2022 09:27:53 +0000

Dear Jean,
Thank you very much for your detailed reply.  What a duffer I am not to realize 
that \global was not being used!  I'll look through - and experiment with - 
your solution with care and great interest.
kind regards,
Alasdair

On Sunday 27 February 2022 19:31:17 (+11:00), Jean Abou Samra wrote:

> Le 27/02/2022 à 08:09, Alasdair McAndrew a écrit :
> > In my current project, I'm trying as far as possible to replicate the 
> > spirit of the original 18th century publication, in which a key change has 
> > a clef printed, and both after the bar line.  In one piece, there's a segno 
> > in the middle of a bar, with such a key change.  In standard Lilypond, this 
> > micro-example shows that the printed clef cdeailedomes before the bar line 
> > (I've left out the segno marker and all other markers outside the score):
> >
> > global = {
> >   \language english
> >
> >   \clef treble
> >   \time 4/4
> > }
> >
> > \relative c' {\key c \major c4 d e fs | g a \bar "||" \set
> > Staff.forceClef = ##t \key c \minor bf c | bf af g f | ef d c2 }
> >
> >
> > But modern practice is to put the clef before the double bar, and the key 
> > change afterwards. I want the clef to come after that double bar.  
> > According to the documentation, this can be changed with "break-alignment", 
> > in particular with:
> >
> > \override Score.BreakAlignment #'break-align-orders =
> > #(make-vector 3 '(span-bar
> >    breathing-sign
> >    staff-bar
> >    key
> >    clef
> >
> >  time-signature))
> >
> >
> > However, in the mini example just given above, adding that override in the 
> > global declaration has no effect.  I tried changing the order of "key" and 
> > "clef" in the override, again with no effect.  (When I tried his in a 
> > larger piece, the key change was printed on the bar-line!)
> >
> > Is there any way I can notate a key change, at a segno with an extra bar 
> > line, in order: bar line, clef, key ?
>deailed
>
> Well, the \global is unused in your example, so it's not
> surprising that the override has no effect. With that
> oversight corrected, the problem is that the break align symbol
> for a KeySignature is not 'key but 'key-signature. You
> will find this at
> http://lilypond.org/doc/v2.23/Documentation/internals/keysignature
> (the break-align-symbol property). So this works:
>
> \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-signature
>                     time-signature))
> }
>
> \relative c' {
>   \global
>   \key c 
> \majorhttps://lilypond.org/doc/v2.23/Documentation/notation/adjusting-horizontal-spacing-for-specific-layout-objects
>   c4 d e fs |
>   g a
>   \bar "||"
>   \set Staff.forceClef = ##t
>   \key c \minor
>   bf c |
>   bf af g f |
>   ef d c2
> }
>
>
> If, like me, you find the space between the clef and the
> key signature slightly excessive, you will want to look
> at 
> https://lilypond.org/doc/v2.23/Documentation/notation/adjusting-horizontal-spacing-for-specific-layout-objects
> (that documentation was added in 2.23, but it works in
> 2.22 as well).
>
> Best,
> Jean
>
>
-- 
0432 854 858
https://numbersandshapes.net



reply via email to

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