The English Hymnal - Wiki Music Experiment/058

From DPWiki
Jump to navigation Jump to search

Lily1 Code

Edit this section and paste your code between the tags <code><pre> and </pre></code>.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%% The English Hymnal, 058.png, Hymn #19.
%%% Format=ABC
%%% 
%%% Dashed barlines 2 measures from end of 1st system and 3 measures before end of piece (I think).
%%% Small note in bottom staff, next-to-last measure.
%%% Some lyrics presented inline with notes.

X: 16
T: ES IST EIN' ROS' ENTSPRUNGEN. (7 6. 7 6. 6 7 6.)
C: Ancient German Melody, Harmony chiefly from M. Praetorius, 1571-1621.
M: 4/4
L: 1/4
Q: 1/4=100
K: F
V:1 staves=4
%%MIDI transpose 0
|:c2|ccdc|c2A2B2|AG2|F2E|F3:|
A|GEFD|C3||c|ccdc|
c2A2B2|AG2|F2E|F3||F4F4||
%
V:2
%%MIDI transpose 0
|:A2|AFFF|E2D2D2|C2D|A,C2|C3:|
F|DCC=B,|C3||E|GFFF|
E2D2D2|F(DE)|FC2|C3||D4C4||
%
V:3 clef=bass
%%MIDI transpose -24
|:c'2|c'aba|g2f2f2|(ac')b|a2g|a3:|
c'|baag|e3||g|gaba|
g2^f2g2|c'ba-|ag2|a3||b4a4||
%
V:4 clef=bass
%%MIDI transpose -24
|:f2|ffbf|c2d2B2|fed-|dc2|f3:|
f|gafg|c3||c|efBf|
c2d2G2|ABc-|cc2|[F3f3]||B4F4||

Lyrics copied from P3 and perl-formatted (chorus done by hand)--QMacrocarpa 15:58, 13 May 2007 (PDT):

"A great and mighty wonder,"
"    A full and holy cure!"
"The Virgin bears the Infant"
"    With virgin-honour pure."
""
"    Repeat the hymn again!"
"        'To God on high be glory,"
"    And peace on earth to men!'"
""
"The Word becomes incarnate"
"    And yet remains on high!"
"And Cherubim sing anthems"
"    To shepherds from the sky."
""
"While thus they sing your Monarch,"
"    Those bright angelic bands,"
"Rejoice, ye vales and mountains,"
"    Ye oceans clap your hands."
""
"Since all he comes to ransom,"
"    By all be he adored,"
"The Infant born in Bethl'em,"
"    The Saviour and the Lord."
""
"And idol forms shall perish,"
"    And error shall decay,"
"And Christ shall wield his sceptre,"
"    Our Lord and God for ay."
""

Lily2 Code

Edit this section and paste your code between the tags <code><pre> and </pre></code>.

To upload the output PDF and midi files, go here: file-repository. You need a userid and password (see this project's main wiki page).

Then create a link in the Lily3 section to those files

%%%% 058.png
%%% Hymn 19 ES IST EIN' ROS' ENTSPRUNGEN
%%% Version 3

\version "2.10"

\header {
 dedication = \markup { \center-align { "THE CHRISTIAN YEAR - CHRISTMAS"
		\hspace #0.1 }}	
 title = "19"
 meter = \markup { \small { \column { \line { \sans "ES IST EIN' ROS' ENTSPRUNGEN." \hspace #1 \roman "(7 6. 7 6. 6 7 6.)" } 
                                 \line { { \italic "In moderate time" \fontsize #-5 \general-align #Y #DOWN \note #"4" #1 "= 100." } } }} }
 arranger = \markup { \small { \center-align { 
		 \line { \italic "Ancient German Melody, Harmony" }
				 \line { \italic "chiefly from" \smallCaps "M. Praetorius, 1571-1621." } }} }
 tagline =""
}


%%%%%%%%%%%%%%%%%%%%%%%%macros

%%prints a repeat sign glyph comprising 4 dots and two thin bars
fdendrepeat = {\once \override Staff.BarLine #'stencil = #ly:text-interface::print 
	\once \override Staff.BarLine #'text = \markup { \line { \raise #1.4 \override #'(baseline-skip . 1.0) \column { \with-color #black { \fontsize #2 . \fontsize #2 . \fontsize #2 . \fontsize #2 .} }
	  \hspace #-1 \filled-box #'(0 . 0.15) #'(-2 . 2) #0
							 \hspace #-0.9 \filled-box #'(0 . 0.15) #'(-2 . 2) #0
	
	} }	
 \bar "||"} 

%%prints a repeat sign glyph comprising 4 dots. Used only to begin a repeat at the start of a piece where \bar ":" does not work	
fdstartrepeat = {\once \override Staff.BarLine #'stencil = #ly:text-interface::print 
	 \once \override Staff.BarLine #'text = \markup { \line { \hspace #0 \override #'(baseline-skip . 1.0) 
	  \raise #1.4 \column { \with-color #black { 
							 \fontsize #2 . \fontsize #2 . \fontsize #2 . \fontsize #2 .} }
	 } }	
 \bar "|:"}
	
%% music function to allow lyrics to skip over any number of note-syllables. 
%% The standard \skip command has its duration ignored when using \lyricsto or \addlyrics. 
%% Each instance of \skip will only skip one note-syllable. 
%% To avoid entering too many \skip commands, use this workaround function. 
%% To skip 8 note-syllables, for example, issue the command \skips #8
skips = #(define-music-function (parser location times) (number?)
     #{
	     \repeat unfold $times { \skip 1}
     #})

%% Macro for generating two augmentation dots for a notehead. When dotted notes from two vocal parts share a single notehead, 
%% Lilypond only inserts a single dot. In the image, two dots are used. 
%% This macro generates the two dots by replacing the normal dot glyph with a glyph comprising a column of 2 dots one above the other.
%% Place \augdots just before the shared note in the lower of the two voices. 

augdots = { 
  \once \override Voice.Dots #'stencil = #ly:text-interface::print 
  \once \override Voice.Dots #'text = \markup {  \hspace #0 \raise #1 
                                                 \line { \translate #(cons -0.2 0) 
                                                 \override #'(baseline-skip . 1 )  \column { 
                                                                                        \musicglyph #"dots.dot" 
                                                                                        \musicglyph #"dots.dot" } } }
 }

   
noacci = \once \override Accidental #'transparent = ##t    
     
%%%%%%%%%%%%%%%%%%%%%%%%%%end of macro definitions

global = {
  \time 4/4 
  \key f \major 
  \set Staff.midiInstrument = "church organ"
}

soprano = \relative c' {
  \fdstartrepeat c'2 \bar "|" c4 c4 d4 c4 \bar "|" 
      c2 a2 bes2 \bar "|" a4 g2 \bar "dashed" f2 e4 \bar "|" f2. \fdendrepeat \break 
  a4 \bar "|" g4 e4 f4 d4 \bar "|" c2. \bar "||" 
      c'4 \bar "|" c4 c4 d4 c4 \bar "|" \break
  c2 a2 bes2 \bar "|" a4 g2 \bar "dashed" f2 e4 \bar "|" f2. \bar "||" 
      \new Voice = amen {f1 f1 } \oneVoice \bar "||"  
}

alto = \relative c' {
  \fdstartrepeat a'2 \bar "|" a4 f4 f4 f4 \bar "|" 
      e2 d2 d2 \bar "|" c2 d4 \bar "dashed" a4 c2 \bar "|" c2. \fdendrepeat \break 
  f4 \bar "|" d4 c4 c4 b4 \bar "|" \augdots c2. \bar "||" 
      e4 \bar "|" g4 f4 f4 f4 \bar "|" \break
  e2 d2 d2 \bar "|" f4 d4 ( e4 -) \bar "dashed" \once \override NoteColumn #'force-hshift = #-1.6 f4 c2 \bar "|" c2. \bar "||" 
      d1 c1 \bar "||" 
}

tenor = \relative c {
  \fdstartrepeat c'2 \bar "|" c4 a4 bes4 a4 \bar "|" 
      g2 f2 f2 \bar "|" a4 ( c4 -) bes4 \bar "dashed" a2 g4 \bar "|" a2. \fdendrepeat \break
  c4 \bar "|" bes4 a4 a4 g4 \bar "|" e2. \bar "||" 
      g4 \bar "|" g4 a4 bes4 a4 \bar "|" \break 
  g2 fis2 g2 \bar "|" c4 bes4 a4 ~ \bar "dashed" a4 g2 \bar "|" a2. \bar "||" 
      bes1 a1 \bar "||" 
}

bass = \relative c { \clef bass
  \fdstartrepeat f2 \bar "|" f4 f4 bes4 f4 \bar "|" 
      c2 d2 bes2 \bar "|" f'4 e4 d4 ~ \bar "dashed" d4 c2 \bar "|" f2. \fdendrepeat \break
  f4 \bar "|" g4 a4 f4 g4 \bar "|" c,2. \bar "||" 
      c4 \bar "|" e4 f4 bes,4 f'4 \bar "|" \break
  c2 d2 g,2 \bar "|" a4 bes4 c4 ~ \bar "dashed" c4 c2 \bar "|" << { \noacci \once \override Stem #'length = #5 f2.} 
      \new Voice = optional {\voiceFour 
      \set fontSize = #-3
      \once \override NoteColumn #'force-hshift = #0.4
      f,2.} >> \bar "||" 
      bes1 f1 \bar "||" 
}

wordsA = \lyricmode { 
	 \override LyricText #'extra-offset = #'(0 . -1)    %% bring words closer to staff
         \override LyricHyphen #'extra-offset = #'(0 . -1)
         \override LyricText #'font-size = #-1 
         \skips #7 a full and "ho" -- "ly" cure. \skips #13 and peace on earth to men. }

wordsB = \lyricmode { 
	  \override LyricText #'extra-offset = #'(0 . 1) 
          \override LyricHyphen #'extra-offset = #'(0 . 1)
          \override LyricText #'font-size = #-1 
         \skips#7 a full and "ho" -- "ly" cure. \skips #13 and peace on earth to men. }

wordsAmen = \lyricmode { \override LyricText #'font-size = #-1 A -- men. }

#(ly:set-option 'point-and-click #f)

\paper {
 #(set-paper-size "a4")
  between-system-padding = 2\mm
  between-system-space = #2
% before-title-space = 0\mm
% after-title-space = 3\mm
% top-margin = 2\mm
% bottom-margin = 3\mm
 print-page-number = ##f

 ragged-last-bottom = ##t
 ragged-bottom = ##t
}

\book{

\score{
\new ChoirStaff	
 <<

	\context Staff = upper << 
	\context Voice = sopranos { \voiceOne \global \soprano }
	\context Voice = altos {\voiceTwo \global \alto }
	 >>
        
	 \new Lyrics \lyricsto amen \wordsAmen
	
	\context Staff = lower <<
	\context Voice = tenors { \voiceOne \global \tenor }
	\context Voice = basses { \voiceTwo \global \bass }
			 >> 
	\new Lyrics  \with {alignAboveContext=upper} \lyricsto sopranos \wordsA	 
	\new Lyrics  \with {alignBelowContext=lower} \lyricsto basses \wordsB
 >>
\layout {
		indent=0
		\context { \Score timing = ##f }
		\context { \Score \remove "Bar_number_engraver" }
		\context { \Staff \remove "Time_signature_engraver" }
		\context { \Score \remove "Mark_engraver" }
		\context { \Staff \consists "Mark_engraver" }
	}
} %%score bracket


\markup{ \hspace #6
  \override #'(line-width . 94 )
  \justify{   "[" \italic { The barring of this tune is necessarily irregular. "  But" its performance will be found to be easy
"              if" it is remembered that the time-value of a crotchet is the same throughout.}  "]"   } }


\markup {   \hspace #10  %% use \hspace or \halign to centre the 3-column group  
	\column {
	  \hspace #1	 
	  \line { \small \italic{ \hspace #0 "Suitable till Candlemas." \hspace #25  "St. Germanus, 634-734.   Tr. J. M. Neale" \upright "†." } }
	  \hspace #1
	  \line {\hspace #26 \small {"Μέγα καὶ παράδοξον θαῦμα." "  [Mega kai paradoxon thauma.]" } }
	   	             \hspace #1  % adds vertical spacing between verses. More such lines more space.     
	  \line {\hspace #20	     
		\column { %% stanza 1 column 
	                  \line { \hspace #2.2 \column { \lower #2.4 \fontsize #8 "A" }   %%Drop Cap goes here
				  \hspace #-1    %% adjust this if other letters are too far from Drop Cap
				  \column  { \raise #0.0 "GREAT and mighty wonder," "   A full and holy cure!"  } }          
	                  \line {  \hspace #2.5  %%adjust hspace until this line left edge is flush with Drop Cap
				   \lower  #1.56  %%adjust this until the line spacing looks right
				   \column {   
					   "The Virgin bears the Infant"
					   "    With virgin-honour pure."
					     \italic {
					       "   "	    
					       "          Repeat the hymn again!"
					       "                'To God on high be glory,"
					       "          And peace on earth to men!'" } 
			  		} }
			       
			           } %% finish stanza 1   
	}  }	  
}
%%fake score block to occupy space and force a pagebreak.  Can't think of a better way of doing this.
\score{
{ s4 }
\header { breakbefore = ##t piece = ##f opus = ##f tagline = ##f }
\layout{
\context { \Staff
\remove Time_signature_engraver
\remove Key_engraver
\remove Clef_engraver
\remove Staff_symbol_engraver
}}}
	
%%second page	

\markup { \hspace #31   %%add space as necc. to center the column   
           \column {
            \line { "2  "
             \column { 
		     "The Word becomes incarnate"
		     "    And yet remains on high!"
		     "And Cherubim sing anthems"
		     "    To shepherds from the sky."
	   }}
	   
	  \hspace #0.1 % adds vertical spacing between verses      
	    \line { "3  "
             \column { 
		     "While thus they sing your Monarch,"
		     "    Those bright angelic bands,"
		     "Rejoice, ye vales and mountains,"
		     "    Ye oceans clap your hands."
	   }}
	   
	   \hspace #0.1 % adds vertical spacing between verses      
	    \line { "4  "
             \column { 
		     "Since all he comes to ransom,"
		     "    By all be he adored,"
		     "The Infant born in Bethl'em,"
		     "    The Saviour and the Lord."
	   }}
	   
	  \hspace #0.1 % adds vertical spacing between verses   
          \line { "5. "
             \column {	     
		     "And idol forms shall perish,"
		     "    And error shall decay,"
		     "And Christ shall wield his sceptre,"
		     "    Our Lord and God for ay."
	   }} 
	  }	  
}


%%%%%%%%%%%%%%%% This next section of code is for
%%%%%%%%%%%%%%%% unfolding the repeats and generating the midi of the main tune
%%%%%%%%%%%%%%%% Not needed for visual layout
                

\score { 
\new ChoirStaff 
<<

\new Staff = "soprano" {\relative c' {\clef treble \global  
    \unfoldRepeats { \repeat volta 2 {  c'2 \bar "|" c4 c4 d4 c4 \bar "|" 
    c2 a2 bes2 \bar "|" a4 g2 \bar "dashed" f2 e4 \bar "|" f2. } } \break 
  a4 \bar "|" g4 e4 f4 d4 \bar "|" c2. \bar "||" 
      c'4 \bar "|" c4 c4 d4 c4 \bar "|" \break
  c2 a2 bes2 \bar "|" a4 g2 \bar "dashed" f2 e4 \bar "|" f2. \bar "||" 
    
}
}

\new Staff = "alto" {\relative c' {\clef treble \global  
  \unfoldRepeats { \repeat volta 2 { a'2 \bar "|" a4 f4 f4 f4 \bar "|" 
      e2 d2 d2 \bar "|" c2 d4 \bar "dashed" a4 c2 \bar "|" c2. } } \break 
  f4 \bar "|" d4 c4 c4 b4 \bar "|" c2. \bar "||" 
      e4 \bar "|" g4 f4 f4 f4 \bar "|" \break
  e2 d2 d2 \bar "|" f4 d4 ( e4 -) \bar "dashed" f4 c2 \bar "|" c2. \bar "||" 
}	
}

\new Staff = "tenor" { \relative c {\clef bass \global  \set Staff.midiInstrument = "church organ"
  \unfoldRepeats {  \repeat volta 2 { c'2 \bar "|" c4 a4 bes4 a4 \bar "|" 
      g2 f2 f2 \bar "|" a4 ( c4 -) bes4 \bar "dashed" a2 g4 \bar "|" a2. } } \break
  c4 \bar "|" bes4 a4 a4 g4 \bar "|" e2. \bar "||" 
      g4 \bar "|" g4 a4 bes4 a4 \bar "|" \break 
  g2 fis2 g2 \bar "|" c4 bes4 a4 ~ \bar "dashed" a4 g2 \bar "|" a2. \bar "||" 
} 
}


\new Staff = "bass" { \relative c { \clef bass \global  \set Staff.midiInstrument = "church organ"
  \unfoldRepeats {  \repeat volta 2 { f2 \bar "|" f4 f4 bes4 f4 \bar "|" 
      c2 d2 bes2 \bar "|" f'4 e4 d4 ~ \bar "dashed" d4 c2 \bar "|" f2. } } \break
  f4 \bar "|" g4 a4 f4 g4 \bar "|" c,2. \bar "||" 
      c4 \bar "|" e4 f4 bes,4 f'4 \bar "|" \break
  c2 d2 g,2 \bar "|" a4 bes4 c4 ~ \bar "dashed" c4 c2 \bar "|" << f2. f,2. >> \bar "||" 
}
}


>>

\midi { 
   \context {
       \Score 
       tempoWholesPerMinute = #(ly:make-moment 100 4)
            }
       }
} %% midi score bracket

%% Amen midi block. Generates the Amen as a separate midi
\score{
  \new ChoirStaff
   <<
        \context Staff = upper 
	                      << 
	\context Voice = "sopranos" { \relative c' { \clef treble \global f1 f1 }}
	\context Voice = "altos"    { \relative c' {  \clef treble \global d1 c1 }}
	                      >>
	\context Staff = lower 
	                      <<
	\context Voice = "tenors" { \relative c { \clef bass \global \voiceThree bes'1 a1 \bar "||" }}
	\context Voice = "basses" { \relative c { \clef bass \global \voiceFour  bes1 f1  \bar "||" }}
			        >> 
  >>			      

\midi { \context { \Score tempoWholesPerMinute = #(ly:make-moment 100 4 ) }}  %%Amen midi       
       
}  

} %% book bracket

Lily3

Download the files from these links, edit the code in Lily2 or else leave notes in the section below.


Notes

Notes by L2 Jkenny 01:11, 23 May 2007 (PDT)

  • I generated 2 midi - one of the main tune with unfolded repeats without amen, and one for the amen by itself.
  • Is the refrain ("Repeat the hymn again!") in a smaller size? Looks like it but hard to say. I rendered it \small, but could someone please verify?
  • Horrifying thought, what about the refrains in Hark the Herald and O Come All Ye Faithful?
  • About the in-line lyrics above and below staff, "ho -- ly" has twp hyphens, but looked illogical, since there's only 1 more note. Left it as one hyphen. Departure from the image. Will need to kludge to force two hyphens.
  • Inline lyrics, this time trying out a recent Lilypond feature called "alignAboveContext" - more economical in terms of code lines.

QMacrocarpa 15:26, 23 May 2007 (PDT)

  • Small note just before Amen-- align with notes above?
  • Are we sizing inline lyrics the same way as amen block lyrics? Or am I being deceived by the font-size color-coding in my proofing PDF? (anyway, should standardize)
  • I think we should keep the refrain default size. Compare e's in refrain with e's in Germanus and Neale-- not same size. Italics in refrain larger. (sigh of relief!)
  • Text below music in square brackets should be default size? Or does the square bracket text get lumped into the lyrics headers size?
  • Can't see all the Greek, someone else please check it.
  • Extra dot after Greek?
  • St. Germanus' dates: 634-734 (hard to believe, but not as hard as 634-784! ;) )
  • What's the official page-size our pages should be set up for: A4 or Letter? I'm afraid there are inconsistencies. See completed hymns 9 and 12. 11 is similar to 9, but seems to have slightly different margin above theme.

Jkenny 09:44, 24 May 2007 (PDT)

  • Small note aligned. I shortened the stem of note above it so they won't join up.
  • The inline lyrics were -1, that's because my ruler showed them to be smaller than the "Pedals" in "Adeste Fideles" which we measured and found to be default. Also the inline lyrics were slightly smaller than the block lyrics. Does that look right to you?
  • The same ruler showed the square brackets text to be larger than the St. Germanus - so the square brackets stuff I now reset to default also.
  • Dot after Greek removed.
  • I have checked Greek, and it was a cut and paste supplied by the Greek thread. We can't do better than those experts -- so I can clear the Greek. Cleared!
  • Dates fixed.
  • Paper size is default (A4). I reverted to default header/footer margins to provide extra safety for those using Letter size PDF viewers.

QMacrocarpa 13:40, 25 May 2007 (PDT)

  • Looking good!
  • Inline lyrics look ok. Out of curiosity, are inline lyrics sized proportionately to the staff they are associated with? So -1 produces smaller size for the lyrics of a small amen block than for lyrics with a standard staff?
  • Something I missed on first look: inline "Amen." needs "."

stygiania 22:49, 25 May 2007 (PDT)

  • Other than the already-mentioned full stop after "Amen", I found no problems.

Jkenny 18:34, 26 May 2007 (PDT)

  • Added the "." after Amen.
  • I think -1 sets an absolute size which is -1 of the default font size. From my 1933 edition, the inline lyrics do look smaller than the block lyrics, and about the same size as the separated Amens. Although the main tune staffs are larger than the Amen, I thought it was plausible that the inline lyrics be -1 as there could be more than 1 stanza, and default size would make the staff look very dense.

Lily3 cleared, files uploaded stygiania 22:41, 29 May 2007 (PDT)

Record of Work

    • Lily1 - done by QMacrocarpa (ABC + perl-formatted Lilypond-style lyrics) warning: Greek!
    • Lily2 - done by Jkenny 01:12, 23 May 2007 (PDT)
    • Lily3 - comments added (but Greek review needed!) QMacrocarpa 15:29, 23 May 2007 (PDT)
fixed errors, reset margins to defaults, cleared the Greek. Jkenny 02:45, 25 May 2007 (PDT)
- another comment --QMacrocarpa 13:42, 25 May 2007 (PDT)
- agreement from stygiania 22:50, 25 May 2007 (PDT)
- fixed. Jkenny 18:35, 26 May 2007 (PDT)
- Lily3 cleared, files uploaded stygiania 22:42, 29 May 2007 (PDT)