% Version: 1.1
% Last edit: March 24, 2006
% The music and words produced by this source code are believed
% to be in the public domain in the United States. The source
% code itself is covered by the Creative Commons Attribution-
% NonCommercial license, 
% http://creativecommons.org/licenses/by-nc/2.5/
% Attribution: Geoff Horton

% **** Note: This file produces "can't find context to switch to" warnings,
% **** but the output is fine (including the desired staff changes).

\version "2.8.0"
\include "english.ly"

#(set-default-paper-size "letter")
#(set-global-staff-size 18)

title = "All Things Bright and Beautiful"
poet = "Cecil Frances Alexander"
composer = "Traditional English"
meter = "76.76, with Refrain"
arranger = "Martin Shaw"
piece = "Royal Oak"

refrainWords = \lyricmode {
  All things bright and beau -- ti -- ful,
  All crea -- tures great and small,
  All things wise and won -- der -- ful,
  The Lord God made them all.
}

verseI= \lyricmode {
  \set stanza = "1."
  Each lit -- tle flow'r that o -- pens,
  Each lit -- tle bird that sings,
  He made their glow -- ing col -- ors,
  He made their ti -- ny wings.
}
 
verseII= \lyricmode {
  \set stanza = "2."
  The pur -- ple head -- ed moun -- tain,
  The ri -- ver run -- ning by,
  The sun -- set and the morn -- ing,
  That bright -- ens up the sky.
}
 
verseIII= \lyricmode {
  \set stanza = "3."
  The cold wind in the win -- ter,
  The plea -- sant sum -- mer sun,
  The ripe fruits in the gar -- den,
  He made them, ev -- 'ry one
}
 
verseIV= \lyricmode {
  \set stanza = "4."
  He gave us eyes to see them,
  And lips that they might tell,
  How great is God Al -- might -- y,
  Who has done all things well.
}
 
refrain = \relative c'' {
  \autoBeamOff
  d4-\tag #'voice ^\markup { \small \italic "Refrain" } b c b |
  a8[ g] fs[ e] d4 b' |
  c e, fs e8[ fs] |
  g1 |
  d'4 b c b |
  a8[ g] fs[ e] d4 b' |
  c e, fs e8[ fs] |
  g2.
  \once \override Score.RehearsalMark #'self-alignment-X = #right
  \once \override Score.RehearsalMark #'break-visibility = #begin-of-line-invisible
  \tag #'voice \mark \markup { \small \italic "Fine" } \bar "|."
}

verse = \relative c' {
  \autoBeamOff
  d4 \bar "|"
  b d d c8[ b] |
  c4 e2 e4 |
  fs8[ g] a4 fs8[ g] a4 |
  d,2. g8[ a] |
  b4 a g a8[ b] |
  c4.( b8) a4 b8[ c] |
  d4 e, fs e8[ fs] |
  g1
  \once \override Score.RehearsalMark #'self-alignment-X = #right
  \once \override Score.RehearsalMark #'break-visibility = #begin-of-line-invisible
  \mark \markup { \right-align \small \italic "Repeat Refrain" }  \bar "||"
}

alto = \relative c' {
  d2 c4 d |
  e c d2 |
  c a |
  b2. c4 |
  d2 c4 d |
  e c d2 |
  c2 a |
  b2. s4 |
  b2. s4 |
  s1 |
  d2. cs4 |
  d2. ~ d4 |
  d2 g4 fs |
  e2 fs4 d |
  d e a,2 |
  b2. \stemDown c4 \stemNeutral
}

staffVoice = \new Staff  {
  \time 4/4
  \key g \major
  \clef treble
  \relative c' {
    \context Voice = "melodyVoi" {
      \dynamicUp
      \refrain {
        \context Voice = "verse" {
          \verse
        }
      }
    }
  }
}

soprano = {
  \removeWithTag #'voice
  { \refrain \verse }
}

staffPiano = \new PianoStaff {
  <<
  \context Staff = "RH" {  % Right hand
    \clef treble
    \key g \major
    <<
    \set Staff.printPartCombineTexts = ##f
    \partcombine
    \soprano
    \alto
    >>
  }
  \context Staff = "LH" {  % Left hand
    \clef bass
    \key g \major
    \relative c {
    }
  }
  >>
}

tenor = \relative c' {
  \showStaffSwitch
  g2 fs4 g |
  e a8[ g] fs4 g~ |
  g2 d |
  g4 s2. |
  b4 g g2 |
  e4 a8[ g] fs4 g |
  g2 d |
  g,4 d' g \bar "|." s4 |
  g,4 g' f g |
  e g \change Staff = "RH" \stemDown c b |
  \change Staff = "LH" \stemUp a4 g fs e |
  fs g a c |
  b2 e,4 fs8[ g] |
  a4. g8 fs2 |
  g2 d |
  g4 s2. \bar "||"
}

bass = \relative c {
  b4 g a g |
  c a d g |
  e c d d, |
  g d' g a |
  g f e d |
  c a d g |
  e c d d, |
  g2. d'4 |
  g,1 |
  c2 a |
  d2. a4 |
  d e fs e8[ fs] |
  g4 fs e d |
  c a d c |
  b c d d, |
  g d' g a
}

\markup {
  \column {
    \fill-line { \large \bold \title } % title
    \fill-line { \caps \piece               % piece
	         \caps \composer      % composer
	  }
    \fill-line { \meter          % meter
	         \arranger           % arranger
	  }
  }
}

\score {
  <<
  \staffVoice
  \context Lyrics = "one" \lyricmode { \lyricsto "melodyVoi" \refrainWords }
  \context Lyrics = "one" \lyricmode  { \lyricsto "verse" \verseI }
  \context Lyrics = "lmelodyVoiLII" \lyricmode  { \lyricsto "verse" \verseII }
  \context Lyrics = "lmelodyVoiLIII" \lyricmode  { \lyricsto "verse" \verseIII }
  \context Lyrics = "lmelodyVoiLIV" \lyricmode  { \lyricsto "verse" \verseIV }
  \staffPiano {
    \context Staff = "LH" {
      \set Staff.printPartCombineTexts = ##f
      \partcombine
      \tenor
      \bass
    }
  }
  >>
  \layout  {
    \context {
      \Score
      \remove "Bar_number_engraver"
    }
    \context {
      \Lyrics
      \override LyricSpace #'minimum-distance = #0.6
      \override LyricText #'font-size = #-1
      \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
    }
    \context {
      \Staff
      \override VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)
    }
  }
}

\markup {
  \fill-line {
    " "
    \column {
      \small \caps \poet % poet
    }
  }
}

\paper {
  ragged-bottom = ##t
  top-margin = 0.25\in
  bottom-margin = 0.25\in
}

%{
  Change log:
  3-24-06 Convert to 2.8, current formatting
%}