\version "2.18.2"
\language "english"

\header {
  title = "Meh"
  composer = "Tommy Montgomery"
  copyright = "(c) 2019 Tommy Montgomery"
}

global = {
  \key e \phrygian
  \set Staff.printKeyCancellation = ##f
  \numericTimeSignature
  \compressFullBarRests
  \omit Voice.StringNumber
  \override TupletBracket #'bracket-visibility = #'if-no-beam
  \override MultiMeasureRest.expand-limit = #3
  \time 4/4
  \tempo 4 = 69
}

introRiff = \relative c {
  e32 e e16 b' e, c'( b) e, a( b) e, c'( b) e, a( b8) |
  e,32 e e16 b' e, c'( b) e, a( b) e, c'( b) e, a( b8) |
  e,32 e e16 e' e, f'( e) e, d'( e) e, f'( e) e, d'( e8) |
  e,32 e e16 e' e, f'( e) e, a'( gs) e, c''( b) e,, c''( d8) |
}

mainRiff = \relative c {
  e32 e e16 <b' e> e, <c' f>( <b e>) e, <a d>( <b e>) e, <c' f>( <b e>) e, <a d>( <b e>8) |
  e,32 e e16 <b' e> e, <c' f>( <b e>) e, <a d>( <b e>) e, <c' f>( <b e>) e, <a d>( <b e>8) |
  e,32 e e16 <g d'> e <a e'>( <g d'>) e <fs d'>( <g d'>) e <a e'>( <g d'>) e <fs d'>( <g d'>8) |
  e32 e e16 <f! c'> e <f c'>( <e b'>) e <f c'>( <e b'>) e <f c'>( <e b'>) e <d' a' d>8. |
}

guitarOne = \relative c' {
  \introRiff
  \mainRiff


  r4 r16 e'16 gs b \grace b( c16 b8) a16 ~ a a( b) e, ~ |
  e4. \tuplet 3/2 { e16( f e) } d2  |
  r8. d32( e f16) g c d \grace e( f e8) d16 ~ d c8 b32( a) |
  f4 ~ f16 ds8. e2 |

  \tuplet 6/4 4 { e,16 f a c e f a, c e f a c e, f a c e f a, c e \ottava #1 f a c } |
  d2 \ottava #0 r16 f,, d a f d a f |

  \bar "||"

  \repeat unfold 2 {
    e32[ e e16 r e32 e] e e e16 e32 e e e e e e16 r e32 e e16 e <a' d>8 |
    e,32[ e e16 r e32 e] e e e16 e32 e e e e e e16 r e32 e e16 e <b'' e>8 |
    e,,32[ e e16 r e32 e] e e e16 e32 e e e e e e16 r e32 e e16 e <a' d>8 |
    e,32 e e16 <f c'> e <f c'>( <e b'>) e <f c'>( <e b'>) e <f c'>( <e b'>) e <d' a' d>8. |
  }

  % pre-chorus 1
  <<
    { e'4. b'16 c ~ c2 | b4. c32( b) a16 ~ a2 | e4. b'16 c ~ c2 | \grace c16( <d d>4..) \grace cs16( <ds ds>16) ~ q2 | } \\
    { <e,,, b'>4. q16 <e c'> ~ q2 | <e d'>4. q16 <e cs'> ~ q2 | <e b'>4. q16 <e c'> ~ q2 | <e d'>4. q16 <e ds'> ~ q2 | }
  >>

  \introRiff
  \mainRiff

  % verse 2
  \time 5/8
  \set Staff.baseMoment = #(ly:make-moment 1/16)
  \set Staff.beamExceptions = #'()
  \set Staff.beatStructure = #'(2 3 3 2)
  e32 e e16 b' e, e c' e, e a( b) |
  e,32 e e16 b' e, e c' e, e a( b) |
  e,32 e e16 g e e a e e fs( g) |
  e32 e e16 g e e a e e bf'( b) |

  e,32 e e16 b' e, e c' e, e a( b) |
  e,32 e e16 b' e, e c' e, e a( b) |
  e,32 e e16 g e e a e e fs( g) |
  \set Staff.beatStructure = #'(2 4 4)
  e32 e e16 f e f( e) <c' f>( <b e>) <a d>8 |

  e32 e e16 b' c e b' c32 b a16 b e |
  e,,32 e e16 b' c e b' c32 b a16 b e |
  e,,32 e e16 a b e b' a32( gs) e16 f d' |
  e,,32 e e16 a b e b' a32( gs) e16 f d' |

  e,,32 e e16 g a cs e d32( cs) a16 b g' |
  e,32 e e16 g a cs e d32( cs) a16 b g' |
  e,32 e e16 <f c'!> e <f c'>( <e b'>) e <f c'>( <e b'>) e |
  <a d a' d>2 ~ q8 |

  % pre-chorus 2
  \time 4/4
  \set Staff.baseMoment = #(ly:make-moment 1/4)
  \set Staff.beatStructure = #'(1 1 1 1)
  \repeat unfold 7 { <b b'>16 } \repeat unfold 9 { <c c'> } |
  \repeat unfold 7 { <d d'>16 } \repeat unfold 9 { <cs cs'> } |
  \repeat unfold 7 { <b b'>16 } \repeat unfold 9 { <c c'> } |
  \repeat unfold 7 { <d d'>16 } \repeat unfold 9 { <ds ds'> } |

  \tuplet 6/4 4 { e16 f a c e f a, c e f a c e, f a c e f a, c e \ottava #1 f a c } |
  d2( ds16\laissezVibrer) \ottava #0 f,, ds a f d b f |

  % chorus
  <e b' e>8. e16 a b c8 ~ c16 c b a <e b' e>8. e16 |
  b' c d8 ~ d16 d c b <e, b' e>8. e16 d' e f8 ~ |
  f16 f e d <e b'>4\glissando <e, b'>8. e32 e <b' fs'>16\glissando( <bf f'>8.) |
  e,32 e e16 <f! c'> e <f c'>( <e b'>) e <f c'>( <e b'>) e <f c'>( <e b'>) e <d' a' d>8. |

  <e, b' e>8 e32 e e e a16 b c8 e,32 e e e b'16 a <e b' e>8 e32 e e e |
  b'16 c d8 e,32 e e e c'16 b <e, b' e>8 e32 e e e d'16 e f8 |
  e,32 e e e e'16 d <e b'>4\glissando <e, b'>8. e32 e <b' fs'>16\glissando( <bf f'>8.) |
  e,32 e e16 <f! c'> e <f c'>( <e b'>) e <f c'>( <e b'>) e <f c'>( <e b'>) e <b' fs' b>8. |

  % interlude/solo
}

vocalMelody = \relative c'' {
  \repeat unfold 18 r1 |

  e4.^"Verse 1" e16 e( d4) b8 b |
  c4 c8 c16 c( b4) r4 |
  e4 f f16( e8.) d8 d |
  c4 c8( b16) b ~ b4 r4 |

  \repeat unfold 4 r1 |
  \repeat unfold 8 r1 |

  % verse 2
  \time 5/8
  \set Staff.beamExceptions = #'()
  \set Staff.beatStructure = #'(2 2 1)
  r8^"Verse 2" b b8. a16 ~ a8 |
  a b c8. c16 ~ c8 |
  c16( b) b4 r4 |
  R1*5/8 |

  r8 b b8. a16 ~ a8 |
  a b c8. c16 ~ c8 |
  c16( b) b4 r4 |
  R1*5/8 |


}

allTheLyrics = \lyricmode {
  Hear the cries __ of the
  ear -- ly to rise__.
  Spread -- ing lies __ as the
  he -- ro __ dies. __

  Some -- day soon __ may your wish be __ grant -- ed.
  Too young to __ know the seeds you've __ plant -- ed.
}

guitarOneStaff = \new Staff \with { midiInstrument = "distorted guitar" }{ \global \guitarOne }



vox = \new Staff \with { midiInstrument = "voice oohs" } {
  <<
    \new Voice = "vocalMelody" { \clef treble \global \vocalMelody }
  >>
}


demLyrics = \new Lyrics \lyricsto "vocalMelody" {
  <<
    \new Lyrics {
      \set associatedVoice = "vocalMelody"
      \allTheLyrics
    }
  >>
}



chordExceptionMusic = {
  <c e g b d'>1-\markup { "maj9" }
  <c e g b fs'>1-\markup { "maj7" \sharp "11" }
  <c ef f g bf>1-\markup { "m7sus4" }
  <c ef gf bff>1-\markup { "°7" }
  <c e g d'>1-\markup { "add9" }
  <c ef g d'>1-\markup { "m(add9)" }
  <c e fs as>1-\markup { \super { \sharp "11" \sharp "13" } }
  <c g>1-\markup { "5" }
  <c e g b>1-\markup { "maj7" }
  <c f g>1-\markup { "sus4" }
  <c d g>1-\markup { "sus2" }
}

chordExceptions = #(append
  (sequential-music-to-chord-exceptions chordExceptionMusic #t)
  ignatzekExceptions
)

chordValues = \chordmode {
  \global
  \powerChords
  \set chordNameExceptions = #chordExceptions
  \set majorSevenSymbol = \markup "maj7"

  \repeat unfold 4 r1 |

  r1 | r1 | r1 | r2. r16 d8.:1.5 |

  e1 | d4.:m e8:7/d q2 |
  c2 g2 | b2:1.3.5-.7/f e2 |
  f1:1.3.5.7+.11+ | d:m |

  e1:1.5 | q | q | q2. q16 d8.:1.5 |

  % verse 1
  e1:1.5 | q | q | q2. q16 d8.:1.5 |

  e4.. c16 q2 |
  g4.. a16 q2 |
  e4.. a16:m q2 |
  d4..:m b16:1.3.5-.7/f q2 |

  \repeat unfold 4 r1 |

  e1:1.5 | q | q | q2. q16 d8.:1.5 |

  % verse 2
  \repeat unfold 8 { r2 r8 }

  a2:m/e q8 | q2 q8 |
  e2:1.3.5.7.9- q8 | q2 q8 |
  a2:7 q8 | q2 q8 |
  f2:1.5 q8 | d2:1.5 q8 |

  % pre-chorus
  e4.. c16 q2 |
  g4.. a16 q2 |
  e4.. a16:m q2 |
  d4..:m b16:1.3.5-.7/f q2 |

  f1:1.3.5.7+.11+ | d2:m b:1.3.5-.7/f |

  % chorus





}

chordNames = \new ChordNames {
  \set chordChanges = ##t
  \set chordNameExceptions = #chordExceptions
  \chordValues
}

\score {
  <<
    \chordNames
    \vox
    \demLyrics
    \guitarOneStaff
  >>
  \layout {
    \context {
      \Staff \RemoveEmptyStaves
      \override Glissando.minimum-length = #4
      \override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods
      \override Glissando.thickness = #2
      \override VerticalAxisGroup.remove-first = ##t
    }
  }
}

\score {
  \unfoldRepeats {
    <<
      \transpose c c, \vox
      \transpose c c, \guitarOneStaff
    >>
  }
  \midi {}
}