% title: Broad Cove
% composer: William Billings
% editor: Michael Lauer

\version "2.12.2"

\include "english.ly"
\include "../mrlUtil.ly"
\include "../mrlbillingsdefs.ly"

#(define GlobalStaffSize 17.25)
#(set-global-staff-size GlobalStaffSize)

#(ly:set-option 'point-and-click #f)

\paper{
    top-margin = .5\in
    bottom-margin = .5\in
    ragged-last-bottom = ##f
    
    myStaffSize = #GlobalStaffSize
  #(define fonts
    (make-pango-font-tree "Baskerville1757"
                          "Sans"
                          "Mono"
                           (/ myStaffSize 20)))
}


global = {
  % main
  
  \override Staff.VerticalAxisGroup #'minimum-Y-extent = #'(-3 . 3)
  
  \set Staff.midiInstrument = "acoustic grand"

  \key g \minor

  \tsThreeTwo
  \partial 2
  s2
  s1.*6
  \tsAllegro
  s1
  \repeat volta 2
  {
      s1*19
  }
    
}

commonLyrics = \lyricmode {
    Time, what an emp -- ty va -- por ’tis,
    And days __ how 
    \tagSA { swift } \tagTB { swift __ } 
    \tagS { they __ } \tagATB { they } are.
    
    \tagS {
        Swift as an In -- dian ar -- row flies __
        or like a shoo -- ting, shoo -- ting, shoo -- ting,
        like a shoo -- ting, shoo -- ting, __ shoo -- ting, __
        shoo -- ting, shoo -- ting,
        like a shoo -- ting, __ shoo -- ting __ star,
        Swift as an In -- dian ar -- row flies __
        or __ like a __ shoo -- ting star.
    }
    \tagA {
        Swift as an In -- dian __ ar -- row flies
        or like a __ shoo -- ting, shoo -- ting, shoo -- ting, shoo -- ting, 
        like a shoo -- ting, __ shoo -- ting star, __
        or __ like a __ shoo -- ting __ star,
        or __ like a shoo -- ting, __ shoo -- ting, shoo -- ting, 
        like a shoo -- ting __ star,
        Swift as an In -- dian ar -- row flies
        or like a __ shoo -- ting __ star.
    }
    \tagT {
        Swift as an In -- dian ar -- row flies
        or like a shoo -- ting, __ shoo -- ting __ star.
        Swift as an In -- dian ar -- row flies
        or like a shoo -- ting, shoo -- ting, __ shoo -- ting star,
        or like a shoo -- ting, __ shoo -- ting star,
        Swift as an In -- dian ar -- row flies __
        or like a __ shoo -- ting star.
        
    }
    \tagB {
        Swift as an In -- dian ar -- row __ flies
        or __ like __ a __ shoo -- ting __ star, __
        Swift as an In -- dian ar -- row __ flies
        or like a shoo -- ting star, __
        Swift as an In -- dian __ ar -- row flies
        or like a shoo -- ting star, __
        Swift as an In -- dian ar -- row __ flies
        or like a __ shoo -- ting star.
    }
}

sopranoNotes = {
    \relative g' {
        \set Staff.instrumentName = "Treble"
        \clef "treble"
        g2 |
        bf1 a2 |
        bf2( a) a |
        bf2( a4 g) fs2 |
        g1 g2 |
        a2( bf4 g) a2 |
        a1 bf4( a8 g) |
        fs1 |
        
        \repeat volta 2 {
            R1 |
            r2 a4 a8 \noBeam a |
            bf4 a a a |
            a8.([ bf16 a8 g] a4) a |
            
            a4 bf a bf8([ c]) |
            d8.([ ef16 d8 c] bf4) bf |
            a8.([ bf16 a8 g] a4) a |
            bf4 c bf a |
            bf8([ c d ef] f4) f8([ ef]) |
            d8([ c bf c] d4) d8([ c]) |
            bf8.([ d16 c8 bf] a4) a |
            
            f'8.([ g16 f8. ef16] d4) c |
            bf4 c d d8([ c]) |
            bf8.([ c16 bf8. a16] bf4) g8.([ a16]) |
            bf1 |
            
            bf4 a8\noBeam g a4 bf |
            a4 a a8.([ bf16]) g8([ a]) |
            bf4 a8.([ bf16]) g4 fs |
            g1 |
        }
    }
}

sopranoLyrics = \lyricmode {
    \keepWithTag #'soprano \commonLyrics
}

altoNotes = {
    \relative d' {
        \set Staff.instrumentName = \markup "Counter"
        \clef "treble"
        % Original clef:
        %\clef "neomensural-c3"
        d2 |
        g1 f2 |
        d4.( ef8 f2) f |
        f2( ef) d |
        d1 d2 |
        f4.( ef8 d2) f |
        f1 d2 |
        d1 |
        
        \repeat volta 2
        {
            R1 |
            f4 f8\noBeam f f4 f8([ ef]) |
            d8([ ef]) f4 f f |
            f4 f8([ ef]) d4 d8([ ef]) |
            
            f8([ ef d ef] f4) f |
            f4 f g d8([ ef]) |
            f4 f f f8([ ef]) |
            d4( c d8[ ef]) f4 |
            f4.( ef8 d4) d8([ ef]) |
            f4 f8([ ef]) d4 d8([ ef]) |
            f2. f8([ g]) |
            
            a4 a bf a8([ g]) |
            f4 a a a |
            g4 d g8.([ a16]) bf8.([ a16]) |
            g1 |
            
            g4 d8\noBeam ef f4 d |
            f4 f f g |
            f4 ef8([ d]) ef4 d8.([ c16]) |
            d1 |
        }
    }
}

altoLyrics = \lyricmode {
    \keepWithTag #'alto \commonLyrics
}


tenorNotes = {
    \relative g {
        \set Staff.instrumentName = "Tenor"
        \clef "treble_8"
        g2 |
        d'1 d2 |
        bf2( c) d |
        d2( c4 bf) a2 |
        g1 bf2 |
        d4.( c8 bf2) c |
        d2( c) bf |
        a1 |
        
        \repeat volta 2 {
            r2 d4 d8\noBeam bf |
            c4 c d d8( ef) |
            f8( ef) d4 c c |
            d4 d8([ ef]) f8.([ g16]) f8.([ ef16]) |
            
            bf1 |
            r2 d4 d8\noBeam bf |
            c4 c d d |
            g4 f8([ ef]) d4 c |
            d8.([ ef16 d8. c16] bf4) bf |
            d8.([ ef16 d8. ef16] f4) f8([ ef]) |
            d4( ef8[ d] c4) c4 |
            
            d2. c4 |
            d4 ef f f8([ ef]) |
            d8.([ ef16 d8. c16] d4) ef |
            d1 |
            
            d4 d8\noBeam d d4 bf |
            c4 c d8([ bf]) c4 |
            d4 ef8([ d]) c([ bf]) a4 |
            g1 |
        }
    }
}

tenorLyrics = \lyricmode {
    \keepWithTag #'tenor \commonLyrics
}

bassNotes = {
    \relative g {
        \set Staff.instrumentName = "Bass"
        \clef "bass"
        g2
        g1 d2 |
        g2( f) d |
        bf2( c) d |
        g,1 g'2 |
        d2( g) f |
        d4.( ef8 f2) g |
        d1 |
        
        \repeat volta 2 {
            d4 d8\noBeam d g4 g |
            f4 f8.([ ef16]) d4 d8.([ c16]) |
            bf8.([ c16]) d8.([ ef16]) f8.([ g16]) f8.([ ef16]) |
            d1~ |
            d1 |
            
            d4 d8\noBeam d g4 g |
            f8.([ g16]) f8.([ ef16]) d4 d |
            g4 a bf f |
            bf,1~ |
            bf1 |
            bf4 bf8\noBeam bf f'4 f8([ ef]) |
            
            d4 d g a |
            bf4 g8([ f]) f4 d |
            g1~ |
            g1 |
            
            g4 f8\noBeam ef d4 g4 |
            f8.([ g16]) f8.([ ef16]) d4 c |
            bf4 c8([ d]) ef8([ c]) d4 |
            g,1 |
        }       
    }
}

bassLyrics = \lyricmode {
    \keepWithTag #'bass \commonLyrics
}

#(define engravedLine (string-append 
    "Engraved by LilyPond (version "
    (lilypond-version)
    ")" ))
 
\header {
	composer = \markup { \larger { \basCaps "William Billings" (1746-1800) }}
    opus = \markup { \larger {\italic 
        { The Continental Harmony } (1794) }}
    title = \markup { \larger \medium \italic "Broad Cove" }
    poet = \markup { \larger "“Words by Dr. Watts”" }
    piece = \markup { \larger { \italic { Hymns and Spiritual Songs } 2:58 \basCaps (cm) }}
    copyright = \markup { \center-column {
        "Edition copyright © 2009 by Michael Lauer."
        "This edition may be freely distributed, duplicated, performed, or recorded." } }
    
    headerMarkup = \markup { "Billings:" \italic "Broad Cove" } 

}
            
allWords = \markup { \fontsize #1
    \fill-line {
         
        \line { \hspace #3 "2."
            \column \addBLigsList
            {
            }
        }
         
    }
}

theMusic = 
  \context ChoirStaff = choir <<
      \new Staff {
        \context Voice =
          sopranoNotes << \global \sopranoNotes >>
      }
      \lyricsto sopranoNotes \new Lyrics { \sopranoLyrics }
      \new Staff {
        \context Voice =
          altoNotes << \global \altoNotes >>
      }
      \lyricsto altoNotes \new Lyrics { \altoLyrics }
      \new Staff {
        \context Voice =
          tenorNotes << \global \tenorNotes >>
      }
      \lyricsto tenorNotes \new Lyrics { \tenorLyrics }
      \new Staff {
        \context Voice =
          bassNotes << \global \bassNotes >>
      }
      \lyricsto bassNotes \new Lyrics { \bassLyrics }
  >>
  
  
\score {
    \theMusic
}

\allWords

\score {
    
    \unfoldRepeats \theMusic
  
    \midi {    }


}
