In LilyPond, ties and slurs are expected to come in matched pairs. I keep coming across situations where a tie or a slur aren't matched. For example:
- As demonstrated in the MWE below, it is possible to have a tied note that goes into a coda (or repeat or some other form of musical jumping) but in LilyPond the
~
form of the tie can't be added to the first note in the coda because it is separated from it's initiating note by line breaks and additional notes- It actually surprises me that musical redirections like coda and segno aren't environments like the
\repeat volta n {} \alternative{{}{}}
setup but that's neither here nor there, I simply bring it up in case I'm wrong and there actually is an environment for coda's and segno notation and jumping.
- It actually surprises me that musical redirections like coda and segno aren't environments like the
- I frequently use a lilypond-book compile to produce only one or two bars to include in a document, and I may want an a tie or slur to be implicitly started, but I only care about presenting the bar in question following the tie or slur marking.
I know LilyPond is designed more for typesetting than understanding flow, but can I force LilyPond to print a tie or a slur without having an original note in mind?
\version "2.18.2"
{
\relative c'' \repeat unfold 2 {
c4 c c c~
}
% Set coda sign as rehearsal mark and adjust size if needed
\once \override Score.RehearsalMark.font-size = #4
\mark \markup { \musicglyph #"scripts.coda" }
\relative c'' \repeat unfold 2 {
c4 c c c
}
\break
\once \override Score.RehearsalMark.extra-offset = #'( -4.5 . 0 )
\once \override Score.RehearsalMark.font-size = #5
\mark \markup { \musicglyph #"scripts.coda" }
% The coda
\relative c'' \repeat unfold 5 {
~c4 c c c
}
\bar"|."
}
To get this MWE to successfully compile, all that is needed is to remove the ~
in front of the last c4
in the final unfold environment.
\repeat segno
exists, see: 1.4.1 Long Repeats - Segno repeat structure