lilypond-user
[Top][All Lists]
Advanced

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

Re: Lining up key signatures


From: James Worlton
Subject: Re: Lining up key signatures
Date: Wed, 29 Apr 2015 13:37:41 -0500

On Tue, Apr 28, 2015 at 7:33 PM, Kieren MacMillan <address@hidden> wrote:
Hi James,

> >I don't see a way to make the key-cancellation and key-signature simultaneous.

The following (hacky!) code seems to work for me:

\version "2.19.18"

musicA = {
  \key c \major
  \repeat unfold 2 { c'4 c' c' c' }
  \key des \major
  des'1
}

musicB = {
  \key fis \major
  \repeat unfold 2 { dis'4 dis' dis' dis' }
  \override Score.KeyCancellation.X-extent = #'(-0.125 . 0) \key c \major
  e'1
}

\score {
  \new StaffGroup <<
    \new Staff { \musicA }
    \new Staff { \musicB }
  >>
}

Hope that helps!
Kieren.

Thanks everyone for responding. (Sorry for the delay in replying. I've been slammed busy since I posted my original question.) The workaround that I'm using, which works great for my purposes, is from Keith's comment (#2) on the bug tracker:
https://code.google.com/p/lilypond/issues/detail?id=448

I inserted  \override Staff.KeyCancellation #'X-extent = #'(0 . 0) in the Staff just before the key change that resulted in the key cancellations. Works great for my needs at this time!

James W.


reply via email to

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