The English Hymnal - Wiki Music Experiment/040

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>.

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

Then create a link in this section to that uploaded midi file.

Midi file here: midi file

Lyrics copied from P3 and perl-formatted--QMacrocarpa 04:42, 18 May 2007 (PDT):

"O come, O come, Emmanuel!"
"Redeem thy captive Israel,"
"That into exile drear is gone"
"Far from the face of God's dear Son."
"        Rejoice! Rejoice! Emmanuel"
"        Shall come to thee, O Israel."
"O come, thou Branch of Jesse! draw"
"The quarry from the lion's claw;"
"From the dread caverns of the grave,"
"From nether hell, thy people save."
"O come, O come, thou Dayspring bright!"
"Pour on our souls thy healing light;"
"Dispel the long night's lingering gloom,"
"And pierce the shadows of the tomb."
"O come, thou Lord of David's Key!"
"The royal door fling wide and free;"
"Safeguard for us the heavenward road,"
"And bar the way to death's abode."
"O come, O come, Adonäi,"
"Who in thy glorious majesty"
"From that high mountain clothed with awe"
"Gavest thy folk the elder law."

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

%%%Hymn 8 VENI EMANUEL "O Come, O Come, Emmanuel."
%%%version 3

\version "2.10"

\header {
dedication = \markup { \center-align { "THE CHRISTIAN YEAR - ADVENT" \hspace #0.1 }}
title = "8"
poet = \markup { \small { \sans {"VENI EMMANUEL."} \hspace #1 \roman {"(8 8. 8 8. 8 8.)"} } }
meter = \markup { \small { \italic { "In free rhythm" \fontsize #-5 \general-align #Y #DOWN \note #"2" #1 = 80. "  To be sung in unison." } } }
composer =  \markup { \small { \italic "Adapted by " \normal-text "T. H" } \hspace #-1.2 \teeny "ELMORE" }
arranger =  \markup { \italic \small { 'from a French Missal.' } }
tagline =""

global = {
\key e \minor
\time 4/2
\set Staff.midiInstrument = "church organ"

shortenStem = \once \override Stem #'length = #5.5
nudgeRight = \once \override NoteColumn #'force-hshift = #0.4

soprano = \relative c' { 
\cadenzaOn \partial 2 e2 \bar "dashed" g2 b2 b2 b2 \bar "dashed"  a2( c2 b2) a2 \bar "dashed" g1. a2 \bar "dashed" b2 g2 e2 g2 \bar "dashed" \break
a2( fis2 e2) d2 \bar "dashed" e1. \fermata \bar "||" \set Score.measurePosition = #(ly:make-moment 2 2 2) a2 \bar "dashed" a2 e2 e2 fis2 \bar "dashed" \nudgeRight g1( fis2) e2 \bar "dashed" d1. g2 \bar "dashed" \break 
a2 b2 b2 b2 \bar "dashed" a2( c2 b2) a2 \bar "dashed" g1. \fermata \bar "||" \set Score.measurePosition = #(ly:make-moment 2 2 2) d'2 \bar "dashed" d1 b2\rest b2 \bar "dashed" b1 b2\rest b2 \bar "dashed" \break 
a2( c2 b2) a2 g2 <fis a>2 \bar "dashed" b2 g2 e2 g2 \bar "dashed" a2( fis2 e2) d2 \bar "dashed" e1. \fermata \bar "||" \break \cadenzaOff 
alto = \relative c' { 
\partial 2 s2 \bar "dashed" e2 < d fis>2 <d g>2 <d g>2 \bar "dashed" \nudgeRight < c e>1 <d~ g>2 <d fis>2 \bar "dashed" \once \override Tie #'extra-offset = #'( 0 . -1 ) d1.~ <d fis>2 \bar "dashed" <d~ g>2 d2 c2 d2 \bar "dashed" \break
<c e> d2 \nudgeRight b1 \bar "dashed" b1. \bar "||" \set Score.measurePosition = #(ly:make-moment 2 2 2) e4( d4) \bar "dashed" c2 e2 b2 d2 \bar "dashed" d2 e2 d2 cis2 \bar "dashed" s1. <b e>2 \bar "dashed" \break 
<d fis>2 <d fis>2 <d g>2 <e g>2 \bar "dashed" \nudgeRight #(set-accidental-style 'forget) <c e>1 #(set-accidental-style 'default) <d~ g>2 <d fis>2 \bar "dashed" d1. \bar "||" \set  Score.measurePosition = #(ly:make-moment 2 2 2) <g b>2 \bar "dashed" <fis a>1 s2 <e g>2 \bar "dashed" <d fis>1 s2 <e g>2 \bar "dashed" \break 
\nudgeRight <c e>1 <d g>2 <d fis>2 d2 d2 \bar "dashed" <g d>2( d2) c2 d2 \bar "dashed" <c e>2 d2 \nudgeRight b1 \bar "dashed" b1. \bar "||" \break
tenor = \relative c { 
\partial 2 <b' g>2 \bar "dashed" <g b>2 s2 s2 s2 \bar "dashed" s1 s1 \bar "dashed" b1.~ s2 \bar "dashed" s2 s2 \nudgeRight g1 \bar "dashed" \break
\nudgeRight a1 g2 fis2 \bar "dashed" g1. \bar "||" \set Score.measurePosition = #(ly:make-moment 2 2 2) \tieUp a2~ \bar "dashed" a2 \nudgeRight g1 a2 \bar "dashed" \nudgeRight b1 \nudgeRight a1 \bar "dashed" a1. s2 \bar "dashed" \break 
<fis~ a>2 <fis b>2 s2 s2 \bar "dashed" a1 g2 a2 \bar "dashed" b1. \bar "||" \set Score.measurePosition = #(ly:make-moment 2 2 2) <b d>2 \bar "dashed" <a d>1 d,2\rest <g b>2 \bar "dashed" <fis b>1 d2\rest <g b>2 \bar "dashed" \break 
a1 s2 s2 b2 s2 \bar "dashed" \nudgeRight g\breve \bar "dashed" \nudgeRight a1 g2 fis2 \bar "dashed" g1. \bar "||" \break 
bass = \relative c { 
\partial 2 e2 \bar "dashed" e2 d2 b2 g2 \bar "dashed" c2 a2 b2 d2 \bar "dashed" g1. d2 \bar "dashed" g,2 b2 c2 b2 \bar "dashed" \break
a2 d2 e2 b2 \bar "dashed" e1. \fermata \bar "||" \set Score.measurePosition = #(ly:make-moment 2 2 2) c4( b4) \bar "dashed" a2 c2 e2 d2 \bar "dashed" << { \voiceTwo \shortenStem g2 \shortenStem e2 \shortenStem fis2 \shortenStem a2 } \new Voice = "pedals" { \voiceFour \set fontSize = #-3 g,2 e2 fis2 a2 } >> \bar "dashed" <d fis>1. e2 \bar "dashed" \break
d2 b2 g2 e'2 \bar "dashed" a,1 b2 d2 \bar "dashed" g1. \fermata \bar "||" \partial 2 g2 \bar "dashed" d1 s2 e2 \bar "dashed" b1 s2 e2 \bar "dashed" \break 
a,1 b2 d2 g2 d2 \bar "dashed" g,2 b2 c2 b2 \bar "dashed" a2 d2 e2 b2 \bar "dashed" <<  { \voiceTwo \once \override Script #'padding = #2.5 e1._\fermata } 
\new Voice = "pedals" { \voiceFour \set fontSize = #-3 \once \override NoteColumn #'force-hshift = #0.1 e,1. } >> \bar "||" \break

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

\paper {
   #(set-paper-size "a4")
   % between-system-padding = 2\mm
   % before-title-space = 0\mm
   % after-title-space = 1.5\mm
   % top-margin = 3\mm
   % bottom-margin = 5\mm
   % between-system-space = #0
   % *** suppresses page numbering
   print-page-number = ##f
   ragged-last-bottom = ##t
   ragged-bottom = ##t

\score { \new ChoirStaff << 
\new Staff = women << \new Voice = "sopranos" { \voiceOne << \global \soprano >> }
                      \new Voice = "altos" { \voiceTwo << \global \alto >> } >>
\new Staff = men << \clef bass 
                    \new Voice = "tenors" { \voiceOne << \global \tenor >> }
                    \new Voice = "basses" { \voiceTwo << \global \bass >> } >>
\layout { indent=0
          \context { \Score
                     \remove "Bar_number_engraver" }
          \context { \Staff
                     \override TimeSignature #'transparent = ##t }

\midi { \context { \Score 
                   tempoWholesPerMinute = #(ly:make-moment 80 2)

\markup { \hspace #85 \small \italic "18th cent.   Tr.  T. A. L." }

\markup { \hspace #45 \small "Veni, veni, Emmanuel." }

\markup {

%%% Lyrics are formatted as a Master Line of three columns: use \hspace or \halign to centre the group

%%% Start Master Line

\fill-line { 
\column { %%start column 1 - comprises first two verses
          \column { \line { \hspace #2 \column { %% this is the column that makes verse 1
                                                 \lower #2.4 \fontsize #8 "O" } %%Drop Cap goes here
                                                 \hspace #-1    %% adjust this if other letters are too far from Drop Cap
                                                 \column  { \raise #0.0 " COME, O come, Emmanuel!" 
                                                                        " Redeem thy captive Israel," } } }
                    \line { \hspace #2.4  %%adjust hspace until this line left edge is flush with Drop Cap
                            \lower  #1.56  %%adjust this until the line spacing looks right
                            \column { "That into exile drear is gone"
                                      "Far from the face of God's dear Son." } }
                    \line { \hspace #13 \italic { \column { " "
                                                            "Rejoice! Rejoice! Emmanuel"
                                                            "Shall come to thee, O Israel." } } 
                  } %%finish verse 1
         \hspace #0.2
         \line { "2  " \column { "O come, thou Branch of Jesse! draw"
                                 "The quarry from the lion's claw;"
                                 "From the dread caverns of the grave,"
                                 "From nether hell, thy people save." } }  
         } %% finish column 1

\column { \filled-box #'(0.0 . 0.1) #'(-30 . 0) #0 }    %% Column 2. This is the line
\column { %%start column 3
          \hspace #0.5
          \line { "3  " \column { "O come, O come, thou Dayspring bright!"
                                  "Pour on our souls thy healing light;"
                                  "Dispel the long night's lingering gloom,"
                                  "And pierce the shadows of the tomb." } }
          \hspace #0.5
          \line { "4  " \column { "O come, thou Lord of David's Key!"
                                               "The royal door fling wide and free;"
                                               "Safeguard for us the heavenward road,"
                                               "And bar the way to death's abode." } }
        } %% end column 3 

} %% finish Master Line

} %% finish \markup

\markup {
          \halign #-2.5
          \column {
          \hspace #0.5
          \line { "5. " \column { "O come, O come, Adonäi,"
                                  "Who in thy glorious majesty"
                                  "From that high mountain clothed with awe"
                                  "Gavest thy folk the elder law." } }

%% Amen score block

\header { breakbefore = ##f 
          piece = ##f
          opus = ##f 

globalAmen = {
\key e \minor
\time 2/1
\set Staff.midiInstrument = "church organ"
\set Staff.fontSize = #-3

\score { \new ChoirStaff << 
\new Staff = upper << \new Voice = "sopranos" { \voiceOne << \globalAmen \relative c' { e1^\markup { \hspace #-9.5 \raise #0.8 \italic \small "Harmony." } e1 \bar "||" } >> }
                      \new Voice = "altos" { \voiceTwo << \globalAmen \relative c' { c1 b1 \bar "||" } >> }
                      \addlyrics { \override LyricText #'font-size = #-1 A_-1 men.1 } 

\new Staff = lower << \clef bass 
                      \new Voice = "tenors" { \voiceOne << \globalAmen \relative c { a'1 gis1 \bar "||" } >> }
                      \new Voice = "basses" { \voiceTwo << \globalAmen \relative c { a1 e'1 \bar "||" } >> }

\layout { 
   ragged-right = ##t
   indent = 15\cm
   \context { \Staff 
              \remove Time_signature_engraver
              \override StaffSymbol #'staff-space = #(magstep -2) }

\midi { \context { 
   tempoWholesPerMinute = #(ly:make-moment 80 2) } 

} % end Amen score


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


Notes by camilla 20:52, 24 May 2007 (BST)

  • Still working out how to get Lilypond to accept the ä in "Adonäi", verse 5. It just grumbles and truncates the line at the moment.
  • This is one of the hymns with dotted bars - have used the standard Lilypond dotted bars: do you like them or would you prefer the dashed ones eg as in 031.png Hymn 2 Mechlin Melody?
  • It's a unison hymn, and doesn't have four clearly identifiable voices.

Notes by Jkenny 20:25, 24 May 2007 (PDT)

  • I would use \bar "dashed" rather than \bar ":". The latter is really a repeat sign.
  • I didn't have a problem with the ä in "Adonäi" (strange, I wonder why?) In fact I cut and paste the ä from your sentence above into my code and it compiled just fine. So I have pasted the same ä into your code above.
  • Yes, a few hymns are unison and doesn't really split easily into 4 voices -- just split into the most convenient number you need. Sometimes I have used up to 5 voices.
  • For the title of the lyrics (the one in Latin), we have standardized on \small rather than \tiny. In fact there is so much diversity on text sizes in the image, and to avoid having to work with vernier calipers every time measuring the text, we've been thinking, shall we roll back our efforts at standardization, and just leave everything as default, casting thereby the final decision on font sizes to the Post Processor? What do you think?
  • I have also commented out a few lines in the \paper block, and also the \overrideProperty... line in the Amen. This is to avoid transatlantic problems. We have lately discovered that by playing around with margins in the \paper block to fit in more music, people who try to view or print the PDF in "letter" size will encounter problems because "letter" is about 17-18mm shorter than A4. So we try to use defaults as much as possible. In the same way, we don't use absolute vertical placement of content (i.e. setting \nonMusicalPaperColumn ) to push the Amen to the bottom - we just leave it at the right edge after the end of the lyrics. Pushing it right to the bottom could again cause trouble for those using letter size.
    • camilla 08:10, 25 May 2007 (BST) Many thanks, Jack. I have dashed the bars and will take another look at the score with a view to being more flexible with the number of parts. Missed the lyrics title standard - thanks for mentioning it; I've corrected the lilypond and that standard is on my radar now. Also thanks for sorting out the \paper block - I read about the problems that had surfaced, but hadn't got as far as the practical coding implications! As far as the ä goes - I remember you wrote somewhere that cut and paste will work as long as you have the right font loaded: I think that must be my problem. I'll read up a bit more and try and sort it. I am so grateful for your Wiki Standards Page; I've found it a huge help. - C

Comment from stygiania 01:51, 25 May 2007 (PDT)

  • Adonäi should not require any special fonts. When you save your .ly file, it needs to be encoded in (saved as) UTF-8.
    • Ah, Saved As.... Gosh, as simple as that, eh. Done. Thanks stygiania! camilla 13:48, 25 May 2007 (BST)

Comment by camilla 15:28 25 May 2007 (BST) Voices rescored and now a better SATB fit (wasn't anything like as awkward as I thought first time round, acksherly...) I think that's all the points addressed that have been put forward so far - any more for any more? Cheers, Camilla. PS: I think using defaults would be a good idea - easier to standardise. Regards, C.

QMacrocarpa 15:35, 25 May 2007 (PDT)

  • The hymn meter needs a few more spaces: "(8 8. 8 8. 8 8.)"
  • I think the hymn meter also needs to be \small instead of default size. The Lily code looks like it might be \small, but my font-o-vision color-coded PDF suggests it is default. Could someone who knows more about Lily check that please?
  • In the tempo marking, the little note there should have its length doubled: [1/2] = 80.
  • I'm not sure what's involved in this, but I notice that in the scan whole notes are generally less aligned with 1/2-notes starting on the same beat than they are in the PDF. See meas. 3, upper staff and meas. 5, lower staff, e.g.
  • But on the other hand, the small notes under the bass in 2nd system are more aligned in the scan.
  • 3rd system, 1st meas.: 3rd and 4th notes sound odd in the MIDI, or is it just me? PDF matches scan.
  • 4th system, 1st meas., top staff, last note: in the scan, it looks like the stem of the D doesn't include the F, but the PDF looks like it does. And given that this is to be sung in unison, is this a typo in the scan, where actually the F SHOULD go with the D and should NOT share the stem with the A? I believe this is the only place where the vocal part appears to be divided.
  • I think the refrain should be default size. We considered using a smaller size on another piece, but decided that the italicized refrain should be same size as rest of lyrics.
  • It seems like an additional linebreak is needed before the refrain. Scan seems to show a vertical break of intermediate size, but to keep things simple and consistent we should avoid such fiddly tweaks, so I suggest just adding a blank line.
  • The Amen block should have "Harmony." above it. I think that's to indicate that after singing all the verses in unison, the final Amen is sung in four-part harmony.
  • A fun hymn fact: my mother had this hymn stuck in her mind around the time that I was born, so I was named for the refrain. True. (what do you mean there's nothing about oaks in the refrain??? ;) ) So you expect us to call you "Gaude" from now on? :wink: If I ever have to go into the DP witness protection program, it would make a nice new username! :) --Q

Jkenny 20:04, 25 May 2007 (PDT)

  • I got a lot of compiler warnings: "too many clashing note columns". Did anyone else get that too? If you compile by double-clicking the ly icon, look for filename.log, where filename is the name of your code file. This constains compiler messages.
  • Warnings are not errors, so the code compiles and you get an output. What is everyone's views, should we avoid warnings or leave them?
  • I think the warnings about clashing note columns arise because of our galloping alto and tenor parts. For example, where an alto changes clef to the "men" with stemUp, it is superimposed over the tenor who also has stemUp, hence the notecolumns "clash". To avoid such warnings, we probably need to rescore -- that is, where 2 notes appear to share a stem, we need to set it as a chord. In other words, abandon all hope of 4 "clean" vocal parts. I think this is all right, because it is a unison piece, and the "parts" are for organ, not voices, so 4 clean vocal parts is not strictly necessary. Any views on this? I'm willing to do the re-scoring if you agree, as I have done it for another piece before, it's not a lot of effort, and besides, I like this hymn.
  • Font and note alignment fixes can be done when I rescore to avoid clashing note columns. We can give the whole notes a little force-hshift to push them away. For the small notes, we can adjust stem lengths so that they don't seem to join up.

Comments from stygiania 22:00, 25 May 2007 (PDT)

  • Dedication line needs to have " - ADVENT" added to it.
  • Yes, I agree we need to get rid of the compiler warnings wherever possible.
  • \bold does not need to be in the Title line.
  • I don't think there is a period after HELMORE on the scan (composer line).
  • Did we decide to follow F1 procedure and include numerals in italics (as in 18th cent.)?

Camilla 07:36, 26 May 2007 (PDT) I don't mind re-scoring (acksherly it just means putting it back the way I did it first time round <guffaws of laughter, off>. I agree this should get rid of the notecolumn clashes, because the code ran clean before the first round of edits. It will also get rid of most of the \stemUp \stemDown commands which - as it happens - stop force-hshift from working. (Still looking for a way around that one: any ideas?) So... that'll make it easier to do the notecolumn tweaks Joyce mentioned. And as for that joke, Joyce... :-D Cheers all. Back in a bit.

Jkenny 08:09, 26 May 2007 (PDT)

  • If force-hshift doesn't work, there's \once \override NoteHead #'X-offset = #-1. Change the number as needed. That will move the notehead. Then you need to move the Stem and Dots (if you have). Unfortunately number for the notehead and stem may not always be the same. It's 2-3 long lines of code to move a little note. Or perhaps someone will come along with a more elegant solution.

Camilla 11:51, 26 May 2007 (PDT)

  • All done; no more warnings about note-column clashes, now that the score is back in Unison. And all the problems with force-hshift vanished vanished along with the stemUps and -Downs as suspected, so I have been able to nudge notes around and provide a better match for the scan. Just have the following notes:
    • Could someone check out the MIDI - Joyce got an odd sound for the 3rd and 4th notes in the third system, 1st measure. 'Fraid I have no sound ATM.
    • Jack, maybe the Wiki standards page needs a minor edit: under Hymn Number - it says "Include in bold type" but has that changed now?
    • Checked the forum, stygiania, and Dani and shabam did agree we should italicize dates as a block, including the numbers.
      • Thank you everybody!

Notes from stygiania 19:00, 26 May 2007 (PDT)

  • To fix the midi (3rd system) change the first bar of the tenor line from <fis~ a>2 <fis~ b>2 s2 s2 to <fis~ a>2 <fis b>2 s2 s2. The additional tie is carrying that note over in the midi.
  • Composer line: Adapted by is italics but "T. Helmore" should be smallcaps.
  • The lyrics disappeared from the Amen block.
  • Need to suppress page numbering.
  • The standards page does say Include in bold but that appears to be the default behavior for the Title field.
  • Remember to change the Version # in the comments at the beginning of the file when you make changes to the file. (I always have to remind myself to do this too.)
OK, done, thanks such a lot, stygiania. I get it about the title field, finally! Have found and fixed the page numbering, but am not sure at all about the \paper block in general. I copied mine from another hymn, but haven't yet managed to work out what the most up to date upload is, so I might not have picked the best one to copy. Am trying to keep my eyes peeled for a new upload!

Notes by Jkenny 19:21, 27 May 2007 (PDT)

  • I changed the guidelines for title to leave as default as I also realised that the default behaviour of the title field is to bold the text.
  • The \paper block is ok. I would leave it as it is for the moment. Basically it's a barebones paper block: we set page to A4 and then don't play around with margins (like decreasing margins to accommodate more stuff). That's because we found that playing around with margins causes problems for people trying to print out on Letter size. I think it is also a good idea to push all the lyrics to the second page rather than have an orphaned single verse on page 1 (which may not fit either). We haven't settled on the final "letter-size"-friendly settings yet - I am still wondering whether we need a blank line on top of the second page lyrics to make things more comfortable for Letter size. But we can do all those things later, after the code is cleared and uploaded. So I would say this piece is good to go.

Lily3 cleared, files uploaded stygiania 21:51, 29 May 2007 (PDT)

Project History

    • Lily1 - done stygiania (midi, Cakewalk, church organ) since vocals are unison, the midi is simply treble line and bass line
- Lyrics added by QMacrocarpa
    • Lily2 - done by camilla; please see notes
    • Lily3 - comments added by J and S. Thanks! - think all fixed - any more, anybody? C.
- Q chimes in
- added some notes, please see. Jkenny 20:09, 25 May 2007 (PDT)
- much agreement and even more notes from stygiania 22:02, 25 May 2007 (PDT)
- all suggestions incorporated up to date, but could someone check whether the MIDI sounds alright please? Thanks, C.
- midi fix and a few notes stygiania 19:07, 26 May 2007 (PDT)
- Thanks for the midi fix; version 3 now uploaded with all amendments in place. Think \paper block could do with a check. Ta, C.
- All checks completed: ready to go? -- Camilla 01:36, 28 May 2007 (PDT)
- Lily3 cleared stygiania 21:51, 29 May 2007 (PDT)