The English Hymnal - Wiki Music Experiment/Lilypondguide

From DPWiki
Jump to navigation Jump to search

Lilypond Guidelines for "The English Hymnal"

  • The aim is to create a Lilypond output image and midi close to the original image and in accordance with the needs of the Post-processor.
  • The intention is that each hymn will be a self-contained piece of Lilypond code and pdf, complete with score and lyrics. If there are two hymns on a page, split them. If a piece of music goes over two pages, combine them as a single notation/score block.
    • This style makes the product a lot more usable as people can download the pdfs of just the hymns they want, print them out, and go for choir practice!

Layout Guidelines

The latest layout settings were discussed and standardized as of 20 May 2007. These are sometimes referred to as the Proposal 3 conventions (the 3rd set of proposals were agreed upon). The guidelines here incorporate those agreements.

Headers and Text

Church Year Themes.

  • Full caps but not in bold!
  • Sometimes they are split over two pages, if so combine them, separated by a hyphen:
  • Sometimes they are complete on one page:
  • Use the 'dedication' field in \header block, with a \column and a blank 2nd line to space it away from the hymn number.
  • Use the default font and size.

Hymn Number

  • Use the 'title' field in the \header block.
  • Use the default font/size for the number.
  • There may be text beside it on the same line, such as "(Alternative Version)" or "(Modern Tune)" usually in small caps, this should be rendered \large (which actually makes it slightly smaller than the number, and matching the style such as in \smallCaps. An example code is:
 title = \markup {"14" \large \smallCaps "(Modern Tune)" }

Tune Name

  • In San Serif but not in bold. Meters like (L. M.) are in Roman and there is one space between the "L." and "M."
  • For character size use \small
  • Because modifiers like \small influence only the nearest complete expression, ensure that \small is scoped to influence the meter by using a set of braces, for example:
 poet = \markup { \small { \sans  "FOREST GREEN."  \hspace #1 \roman  "(D. C. M. Words irreg.)" } }


  • Match the image style which is usually in italics.
  • The default size of the printed music note needs to be made smaller to match the image, otherwise its stem would be too tall. Use \fontsize # -5
  • The number after the music note is in Roman, and there is a period after the number.
  • Character size: wrap everything in the \small modifier. Again use braces as necessary to ensure that \small influences the music note and tempo number.
  • Sample code block for 1/4 note = 92 tempo:
meter = \markup { \small { \italic "In moderate time" \fontsize #-5 \general-align #Y #DOWN \note #"4" #1 = 92.} }

Composer or source

  • Match styles, whether italic or smallcap (see note on italics below).
  • For character size: \small

Placement of Header information

  • From the manual you will find many fields available. Choose appropriate ones to produce text on left and right above the music to match the image.
  • Typically, the tempo line on the left will be on be on the same line as the bottom line of the composer or source.
  • In choosing fields to align with each other, remember that poet(left) = composer(right) and meter(left) = arranger(right).
  • If a long source has, for example, three lines which are center-aligned, you may need to put all the information within a single field, using a center-aligned column of three lines. If so, the left side probably needs to be a column also, in order to maintain alignment.


  • Where italic text occurs with other kinds of typefaces such as smallCaps, we match the image unless the context makes it clear that italics is what the printer intended. See discussion forumpost: 321717. For example, where a book's name is given in italics and the date of publication comes after, it is reasonable to suppose that the printer would have italicized the date numerals if he could have, so we italicize the numerals.

Notes and Descriptive Text about the Hymn

  • Some hymns have blocks of text, usually immediately below the music, giving more information about the hymn, or instructions for singing. These are sometimes in italics within square brackets e.g. 097.png Hymn 43 (Alternative Version), and sometimes italics or a mixture of smallcaps and italics without brackets.
  • Match the font style in the image - italic, small cap etc as appropriate.
  • Where the text is in italics within square brackets, the square brackets are left upright.
  • Use the default font-size.

Copyright information

  • In a few cases, there is small print giving copyright information (such as it then was) immediately below the music. E.g. 101.png Hymn 47.
  • These are smaller than everything else on the page and made two sizes smaller than the default font with the command:
 \small \smaller

Greek and other alphabets, dagger symbols etc., stuff needing unicode

  • The simplest way is to use a unicode aware editor such as jedit, gedit. Set the encoding of the ly file to UTF-8.
  • Find the symbol somewhere e.g. on a webpage. Copy and paste it into the \markup that you want. Lilypond will print it into the pdf! (If you have the appropriate font).
  • Refer to the [other languages page] where friendly DPers have helped with providing unicode characters and transliterations.

Music Staffs

  • Leave the system-start delimiter bar in, so there will be a choir brace plus a thin bar line.
  • This can be easily removed later with a single command.


Theme above Lyrics

  • Some lyrics have the Church Year Theme printed immediately before them. We omit these, since they are already in the headers.

Lyric Text

  • Use the default font and font size for lyric text

Indented Lines in Verses"

  • Standardize the indented lines with 4 spaces thus:
 "O perfect Love, outpassing sight," 
 "    O Light beyond our ken,"


  • This is worth doing if matching the original 2 columns helps to keep the entire piece on 1 page.
  • It the piece needs a second page in any case, having 2 columns is probably not necessary, and it keeps the code simpler to have a single column of lyrics.

Line between columns

  • If there is a line dividing verses into 2 columns, this can be done using the \filled-box command within the markup block. Copy from a finished piece.

Drop Cap for first stanza

  • Reproduce it. Copy from one of the earlier finished works.

Stanza numbers

  • Match original. Only last stanza number is punctuated.
  • Standardize spacing: 2 spaces after numeral, 1 space after numeral and dot, thus:
"1  " and "5. "

Unison, asterisks and other lyric markings

  • These are considered part of the lyrics like the stanza numbers and are left in default font-size.
  • Match the style - for example "Unison" is often italicized in the image, so they are italicized.
  • Some verses have asterisks, which indicate verses which can be omitted without "doing violence to the context" according to the Preface. They are considered part of the verse number. Put them just after the number and then a space thus: "7* ".

Lyrics - attribution and title

  • Lyrics will often have text above giving the author name, a title in a foreign language etc. These are all rendered with a smaller character size (matching the image) using \small.

Inline Lyrics

  • Inline lyrics (lyrics within the music staffs) are slightly smaller than the lyrics laid out as a block of text. These are modified with \override LyricText #'font-size = #-1.

Lyrics in the Amen Block

  • These are also smaller, and the same size as inline lyrics (although their staff size is smaller. Use \override LyricText #'font-size = #-1.

Amen Block

  • Right justified at the bottom below the lyrics
  • Staff should be a smaller size than the main tune.
  • Standard settings for this will be agreed on soon!


  • Set midi instruments for all voices to "Church Organ"
  • This seems to be the most versatile and gives a good sound even on old sound cards.
  • Generate a separate midi for the "Amen" and upload two midi files.
  • If there are repeats, the repeat needs to be unfolded for the midi. See Repeats and midi in the Code Style Guide below.

Code Style Guidelines

Voices and Staffs, Relativities

The music is set in four vocal parts, Soprano, Alto, Tenor and Bass. In notating the Lilypond, notate each vocal part as a separate voice, then combine them in the score block into 2 staffs. To standardise on relativities, use the following:

  • For soprano and alto: use relative c'
  • For tenor and bass: use relative c

The notating of the voical parts separately helps people who want to extract individual parts or represent the music in 4 staffs. Lily1 input coming from ABC and Midi would be in 4 parts anyway.

A sample code would look like:

soprano = relative c' { ... }

alto = relative c' { ... }

tenor = relative c { ... }

bass = relative c { ... }

global = { ... put the key and time signatures here }

    \new ChoirStaff	

	\context Staff = upper << 
	\context Voice = sopranos { \voiceOne \global \soprano }
	\context Voice = altos    {\voiceTwo \global \alto }
	\context Staff = lower <<
	\context Voice = tenors { \voiceOne \global \tenor }
	\context Voice = basses { \voiceTwo \global \bass }
    \layout {        }

Time Signatures

Most pieces here don't have one. Choose one that fits the measures, then suppress printing by putting in the layout block this command:

 \context { \Staff \remove "Time_signature_engraver" }

Repeats and Midi

Many hymns have repeats. By default, Lilypond midi will not play out the repeats. So a separate section of code needs to be provided which unfolds the repeats with the \unfoldRepeats command, to generate the midi.

In generating the midi, set midi instruments to "church organ".

Generating the PDF

Turn off point and click information in the PDF (it halves the size of the resulting file. Insert this command somewhere in the code:

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

Conversion from ABC

still working on this

Conversion from Midi

still working on this