User:Jkenny/plainsong test

From DPWiki

Here is the Lilypond output of my first attempt to typeset a plainsong piece from the English hymnal.

155.png

And for what it's worth, my code is pasted in below.

Note that when compiled, Lilypond throws up various complaints related to the vaticana ligatures, but it still produces the output correctly.

I did not really know what I was doing and just poked around, trying out various features in the manual until I got the output desired. What I have done so far:

  • The vaticanastaff context provided by Lilypond was quite restrictive and could not accommodate e.g. barlines. There were also some problems aligning to the SATB notes below it.
  • So I had to jury-rig a custom staff and voice designs which I called the plainsongstaff context and plainsong voice context. Unwanted engraving features such as time signatures and stems were removed, and needed features such as the vaticana ligature engraver.
  • I stumbled upon how to beamed half-notes (minims). The needed command is \override NoteHead #'duration-log = 1. The notes in the SATB parts are actually 1/4 notes (crochets) and beamed 1/8 notes (quavers). The addition of \override NoteHead #'duration-log = 1 seems to turn all the noteheads white.
  • The code needs to be made tighter and some features need to be refined, I'll look into these later, and would appreciate feedback and advice. But here it is, all that I could do after a few hours work.
\version "2.10.19"

\include "gregorian-init.ly"

stemOff = \once \override Stem #'transparent = ##t

plainsong = 
  \context PlainsongVoice  {   
  \set Score.timing = ##f
  \override Staff.KeySignature  #'style = #'vaticana
  \override Staff.Accidental  #'style = #'vaticana
  \clef "vaticana-do3"
  \set fontSize = #3
  c d e f  \[ e8 \flexa \auctum \descendens d \]  c4 d \bar "|" f g a b! \[ \virga a8 \inclinatum   g \inclinatum f \] \bar "" \break 
  g4 a \bar "|" c d e f \[ \virga f8 \inclinatum e \inclinatum d \] c4 d  \bar "||"	
}


soprano =  \relative c' {   \clef treble  \key d \major 
  \new Voice = "sopranobeat" { \override NoteHead #'duration-log = 1  \cadenzaOn  
  d4 e4 fis4 g4 fis8[ e8] d4 e4 \bar "|" g4 \stemUp a4 b4 c4 b8[ a8 g8] 
  a4 b4 d,4 e4 g4 a4 g8[ f8 e8] d4 e4 \bar "||" }
}

alto = \relative c' { \clef treble \key d \major \override NoteHead #'duration-log = 1  \cadenzaOn 
  b4~ b4 d2 d8[ b] b4 b4 \bar "|"  \stemOff d2 ~ d4 e4 \stemOff e4. 
  fis4 g4 d4 b4 d4 c d4  \times 1/2 { c4 } b4 b4 } 

tenor = \relative c { \clef bass \key d \major \override NoteHead #'duration-log = 1  \cadenzaOn 
  g'4 ~ g4 a4 b4 ~ b8[ g8] fis4 g4 \bar "|" g4 fis4 g4 g4 g8[ a8 b8]
  d4 d4 a4 g4 g4 e4 \stemOff g4 ~ \times 1/2 { g4 } g4 g4 \bar "||" }

bass = \relative c { \clef bass \key d \major \override NoteHead #'duration-log = 1  \cadenzaOn 
  g'4 e4 d4 g,4 \stemOff b4 ~ b4 e4 \bar "|" b4 d4 g4 c,4 \stemOff e4.	
  d4 g4 fis4 e4 b4 a4 \stemOff b4 \times 1/2 { c4 } g4 e4 \bar "||" }
  
words = \lyricmode { 
  Come, thou ho -- ly Par -- _ a -- clete, And from thy ce -- les -- _ _ tial 
  seat; Send thy light and bril -- _ _ lian -- cy:
}


\score {
<<	
   <<
    \new PlainsongStaff = "plainsongtune" {\plainsong }
    \new Lyrics = "mainlyrics" {s1}
    \new ChoirStaff <<
    \new Staff = "upper" <<
       \context Voice = sopranos {\voiceOne \soprano }
       \context Voice = altos {\voiceTwo \alto }
                         >> 
     \new Staff = "lower" <<
       \context Voice = tenors {\voiceOne \tenor }
       \context Voice = bass {\voiceTwo \bass }
	                  >>
		    >>	  
   >>
    \context Lyrics \lyricsto "sopranobeat" \words
>>    

\layout {

      \context { \Score \override SeparationItem #'padding = #4 }
      \context { \Score \override TimeSignature #'stencil = ##f }
	    
      \context {
	    \Score
	    \accepts PlainsongStaff
	}

        \context {
	    \Voice
	    \name PlainsongVoice
	    \alias Voice
	    \remove Ligature_bracket_engraver
            \consists Vaticana_ligature_engraver
	    \remove Stem_engraver
	    \override NoteHead #'style = #'vaticana.punctum
	    autoBeaming = ##f
	}
	\context {
	    \Staff
	    \name PlainsongStaff
	    \alias Staff
	    \accepts PlainsongVoice
	    \consists Custos_engraver
	    \remove Time_signature_engraver

	    \override StaffSymbol #'thickness = #0.8
	    \override StaffSymbol #'line-count = #4
	    \override KeySignature #'style = #'vaticana
	    \override Accidental #'style = #'vaticana
	    \override Custos #'style = #'vaticana
	    \override Custos #'neutral-position = #4
	    \override Custos #'neutral-direction = #down
	    clefGlyph = #"clefs.vaticana.do"
	    clefPosition = #1
	    clefOctavation = #0 
	}
    }
}