]> git.donarmstrong.com Git - lilypond.git/commitdiff
Adds incipit section to the NR
authorPhil Holmes <mail@philholmes.net>
Tue, 30 Sep 2014 15:09:13 +0000 (16:09 +0100)
committerPhil Holmes <mail@philholmes.net>
Mon, 6 Oct 2014 16:04:51 +0000 (17:04 +0100)
Documentation/notation/ancient.itely
ly/property-init.ly
scm/paper.scm

index e4ded2fa4f88b7a93582d05e085085e49e6b43d0..9d74daf0627794f730e6e278a00f0a6dedbc06a5 100644 (file)
@@ -2647,10 +2647,39 @@ same source.
 @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 ...
index 852dbcee9ebaf5cf6d55f874b561114c4c2fe294..f27311f9a4b8e42a2e6cfd918f0a798319adb79c 100644 (file)
@@ -196,17 +196,6 @@ easyHeadsOff = {
 }
 
 
-%% 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 =
@@ -285,6 +274,54 @@ improvisationOff = {
   \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
index d0adef3033a48df7b39a0db5505f73a13c9057c6..9e702abc6e865e9c6d92bdab6af39eb2816498a3 100644 (file)
@@ -28,6 +28,7 @@
                     footnote-padding
                     horizontal-shift
                     in
+                    incipit-width
                     indent
                     inner-margin
                     inner-margin-default-scaled