@node Incipits
@unnumberedsubsubsec Incipits
-@c TODO Add text
-@c clefs, mensuration signs etc from lsr and -user
-@c use snippet Transcription-of-ancient-music-with-incipit
-TBC
+It is customary when transcribing mensural music into modern notation to place
+an indication of how the initial rests and note or notes of the original version
+appeared - including the original clefs. This is called an @emph{incipit}. The
+@code{\incipit} command uses the @code{indent} of the main staff to set the
+width occupied by the incipit, and @code{incipit-width} to set the width of the
+incipit staff.
+
+@lilypond[verbatim,quote,ragged-right]
+\score {
+ \new Staff <<
+ \new Voice = Tenor {
+ \set Staff.instrumentName = #"Tenor"
+ \override Staff.InstrumentName.self-alignment-X = #RIGHT
+ \incipit { \clef "mensural-c4" \key f \major r\breve r1 c'1 }
+ \clef "treble_8"
+ \key f \major
+ R1 r2 c'2 |
+ a4. c'8
+ }
+ \new Lyrics \lyricsto Tenor { Cyn -- thia your }
+ >>
+ \layout
+ {
+ indent = 5\cm
+ incipit-width = 3\cm
+ }
+}
+@end lilypond
+
+@knownissues
+Note that instrumentName must be set in the music for the incipit to be
+produced. If no instrument name is required then use
+@code{\set Staff.instrumentName = #""}.
@c @seealso
@c ... and reference to other sections ...
}
-%% endincipit
-
-%% End the incipit and print a ``normal line start''.
-endincipit = \context Staff {
- \partial 16 s16 % Hack to handle e.g. \bar ".|" \endincipit
- \once \override Staff.Clef.full-size-change = ##t
- \once \override Staff.Clef.non-default = ##t
- \bar ""
-}
-
-
%% fermata markup
fermataMarkup =
\revert AccidentalCautionary.stencil
}
+%% incipit
+
+incipit =
+#(define-music-function (parser location incipit-music) (ly:music?)
+ #{
+ \once \override Staff.InstrumentName.stencil =
+ #(lambda (grob)
+ (let* ((instrument-name (ly:grob-property grob 'long-text))
+ (align-x (ly:grob-property grob 'self-alignment-X 0))
+ (align-y (ly:grob-property grob 'self-alignment-Y 0)))
+ (set! (ly:grob-property grob 'long-text)
+ #{ \markup {
+ \score
+ {
+ \new MensuralStaff \with {
+ \override InstrumentName.self-alignment-X = #align-x
+ \override InstrumentName.self-alignment-Y = #align-y
+ instrumentName = #instrument-name
+ }
+ {
+ $incipit-music
+ }
+ \layout {
+ $(ly:grob-layout grob)
+ indent-incipit-default = 15\mm
+ line-width = #(primitive-eval
+ '(or (false-if-exception indent)
+ indent-incipit-default))
+ indent = #(primitive-eval
+ '(or (false-if-exception (- line-width incipit-width))
+ (* 0.5 line-width)))
+ ragged-right = ##f
+ ragged-last = ##f
+ system-count = 1
+ \context {
+ \Score
+ \remove "Default_bar_line_engraver"
+ }
+ }
+ }
+ }
+ #})
+ (set! (ly:grob-property grob 'self-alignment-Y) #f)
+ (set! (ly:grob-property grob 'self-alignment-X) RIGHT)
+ (system-start-text::print grob)))
+ #}
+)
+
%% kievan
kievanOn = {
\override NoteHead.style = #'kievan