I need to write a coda which starts with a change in key and time signature.
The example taken from the manual does not illustrate this requirement. All
my attempts have resulted in visible a key signature and time signature  at
the end of the melody section (before the coda). I want to hide this and if
possible create extra space between the melody and coda sections. Does
anyone have a suggestion as to how this could be achieved? I include a
snippet to illustrate the problem.

 

John McWilliam

%Example taken from the manual does not show how the Coda (line 2) changes in key 
%signature and time signature can be hiden at the end of the line 1. 

\version "2.14.2"

  \relative c'' {

    \clef treble \key g \major \time 4/4
    \repeat unfold 2 {
      | c4 c c c
    }
    
    \mark \markup { \musicglyph #"scripts.segno" }
    \repeat unfold 2 {
      | c4 c c c
    }

    \once \override Score.RehearsalMark #'font-size = #4
    \mark \markup { \musicglyph #"scripts.coda" }
    \repeat unfold 2 {
      | c4 c c c
    }

    \bar "||"

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

    \cadenzaOn
      \stopStaff
        \once \override TextScript #'word-space = #1.5
        \once \override TextScript #'X-offset = #8
        \once \override TextScript #'Y-offset = #1.5
        | s1*0^\markup { \center-column { "D.S. al Coda" 
        \line { \musicglyph #"scripts.coda" 
        \musicglyph #"scripts.tenuto" \musicglyph #"scripts.coda"} } }

        % Increasing the unfold counter will expand the staff-free space
        \repeat unfold 4 {
          s4 s4 s4 s4
          \bar ""
        }
     \startStaff
   \cadenzaOff

   
%   \once\set Staff.explicitKeySignatureVisibility = #end-of-line-invisible 
%   \once\override Staff.KeySignature #'break-visibility = #end-of-line-invisible

   \break
   \once \override Staff.KeySignature #'break-visibility = #end-of-line-invisible
   \once \override Staff.Clef #'break-visibility = #end-of-line-invisible

   
   \clef treble \key f \major \time 3/4
   

     \once \override Score.RehearsalMark #'extra-offset = #'( -8.42 . 1.75 )

   \once \override Score.RehearsalMark #'font-size = #5
   \mark \markup { \musicglyph #"scripts.coda" }

   % The coda
   \repeat unfold 5 {
      | c4 c c 
    }
    \bar"|."
}
\layout {ragged-last = ##t}

_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to