2

My piece involves a D.S. al coda repeat across a key signature change, like:

\mark \markup { \musicglyph #"scripts.segno" }

\key a \minor
a b c' d'
% more music in a minor

\key a \major
a b cis' d'
% more music in a major

\once \override Score.RehearsalMark #'break-visibility = #end-of-line-visible
\once \override Score.RehearsalMark #'self-alignment-X = #RIGHT
\mark "D.S. al coda"
\bar "||"

% coda in a major follows

To help the player make the transition back from a major to a minor at the dal segno I'd like to print a key cancellation just before the double bar. The bars of the coda that follows, should remain in a major.

How would I accomplish that in Lilypond 2.14 or higher?

Hendrik
  • 569
  • 3
  • 12
  • 1
    Hi Hendrik, did you think about joining LilyPond's mailing list, where you can contact other LilyPond users and developers? Normally that is the best (and fastest) way to solve a problem or get an answer. To sign up, please visit lilypond.org/contact.html – gilbertohasnofb Dec 05 '13 at 04:45
  • 1
    I don't know why there is a lilypond tag in SO if people are always sent to the mailing list. I also was referred to somewhere else: http://stackoverflow.com/questions/30678473/how-to-start-measure-halfway Maybe we should remove the tag? – bgmCoder Jul 21 '15 at 16:59

1 Answers1

2

Append to your code

\key a \minor  % change key back from a-major to a-minor
s1             % enforce output of key cancellation with a hidden rest
\bar ""        % suppress trailing bar