\paper {
  oddFooterMarkup = \markup {
    \fill-line { \line {
      \italic \fromproperty #'header:title
      " - Page "
      \fromproperty #'page:page-number-string
      " of 1"
    } }
  }
  evenFooterMarkup = \oddFooterMarkup
}
%#(set-global-staff-size 17)

\include "english.ly"
\header{
  title = "Gelosia"
  subtitle = \markup \italic "Longways for 3 couples"
  poet = "Domenico, 1450"
  composer = "arr. Monica Cellio"
  meter = "AAA B CC D EE FFF GG x 3"
  tagline = ""
}

global= {
  \key g \dorian
  \time 4/4
}

chordLine = \chordmode {
  \set chordChanges = ##t

  % A
  g1:m | d2:m g2:m 

  % B
  g1:m a2:m g2:m 

  % C
  g1:m g1:m g2.:m d4:m 

  % D
  c2 g4:m d4:m |

  % E
  g1:m d1:m |

  % F
  g1:m |

  % G
  c4 d4:m | g4:m d4:m | d2:m
}

cantusMusic = \relative c' {
  \time 4/4

  \repeat volta 3 { bf'8^\markup{\box A} a bf c d4 d | f8 e16 f d8 c bf8 a16 bf g8 a^\markup{\translate #(cons 3 0) "(3)" } }
  bf8^\markup{\box B} a bf c d4 d | c8 bf16 c bf8 a g4 g |
  \repeat volta 2 { g'8^\markup{\box C} f e d g f e d | g f e f d4 d | bf8 a bf c d4 d^\markup{\translate #(cons 5 0) "(2)" }  }
  c8^\markup{\box D} bf8 c8 a8 g4 f4 |
  \repeat volta 2 { bf8^\markup{\box E} a bf c d4 d | f4 f8 e d4 d^\markup{\translate #(cons 4 0) "(2)" }  }
  \repeat volta 3{ g4^\markup{\box F} f8 e d4 d^\markup{\translate #(cons 4 0) "(3)" }  }

  \time 2/4
  \repeat volta 2 { c8^\markup{\box G} bf16 c a8 g | bf8 a16 bf a8 g | f4 f^\markup{\translate #(cons 3 0) "(2)" } }
}

altoOneMusic = \relative c' {
  \repeat volta 3 { d4 bf d4 bf | a d g d  }
  d g, bf8 a d bf | c4 d bf d 
  \repeat volta 2 { d4 e8 bf d4 e8 bf | d4 e8 a bf4 bf | d, d d a }
  g4 g8 f g4 a
  \repeat volta 2 { bf4 d bf8 c d4 | d4 a4 a2 }
  \repeat volta 3 { bf4 bf8 c bf2 }
  \repeat volta 2 { g'4 f8 d | d4 f8 bf | a4 a }
}

bassOneMusic = \relative c' {
  \repeat volta 3 { g2 g | d g4 g }
  g bf g g a g g2 
  \repeat volta 2 { g4 c8 g g4 c8 g | g4 c8 d g,4 g | g4 g d d }
  e8 g e d bf'4 d,
  \repeat volta 2 { g2 g2 | d d }
  \repeat volta 3 { g2 g }
  \repeat volta 2 { e4 d8 g | g4 d8 g | d4 d}
}

\score {
  \context ChoirStaff <<
    \context ChordNames = chordcontext << \global \chordLine >>
    \context Staff = cantusStaff <<
      \context Voice = cantus {
	<< \global \cantusMusic >> 
      }
    >>

    \context Staff = altusStaff <<

      \context Voice = altus { 
	<< \global \clef "G_8" \altoOneMusic >> 
      }
    >>

    \context Staff = tenorStaff << 
      \context Voice = tenor{ 
	<< \global \clef "G_8" \bassOneMusic >>
      }
    >>

    \context Staff = bassusStaff << 
      \context Voice = bassus { 
	<< \global \clef bass \bassOneMusic >>
      }
    >>

  >>

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


  \layout { 
    indent = 0\mm
  }
}


\version "2.10.10"  % necessary for upgrading to future LilyPond versions.
