\version "2.22.1"
\language "english"

\header {
  title = "Something"
  composer = "Tommy Montgomery"
  copyright = "(c) 2022 Tommy Montgomery"
}

global = {
  \key cs \minor
  \set Staff.printKeyCancellation = ##f
  \numericTimeSignature
  \compressEmptyMeasures
  \omit Voice.StringNumber
  \override TupletBracket #'bracket-visibility = #'if-no-beam
  \override MultiMeasureRest.expand-limit = #3
  \override Score.ChordName.font-name = #"Noto Serif"
  \override Score.ChordName.font-size = #0
  \override Score.LyricText.font-name = #"Noto Serif"
  \override Score.LyricText.font-size = #0
  \tempo 4 = 60
}


guitarOne = \relative c' {
  \repeat unfold 2 {
    \repeat unfold 2 { cs16 gs' b ds e ds b gs } |
    \repeat unfold 2 { gs, gs' ds' b e b ds gs, } |
  }

  \repeat unfold 2 { b, fs' b ds e ds b fs } |
  \repeat unfold 2 { a, e' gs b fs' b, gs e } |
  e, b' fs' b, a' fs b a e' a, b fs a b, fs' b, |
  e, b' e b gs' e b' gs e' gs, b e, gs b, e e, |

  \repeat unfold 2 { fs cs' fs a e' b a fs } |
  e, b' e gs fs' b, gs e e, b' e gs e' b gs e
  \repeat unfold 2 { fs, cs' fs a e' b a fs } |
  gs, a' cs fs gs fs cs a gs, gs' bs ds gs4 |

}

vocalMelody = \relative c' {
  R1*12 |

  % verse 1
  r2 cs8 ds e cs16 gs' ~ | gs4 r4 gs8 fs e ds16 cs ~ |
  cs4 r4 cs8 ds e cs16 gs' ~ | gs4 fs8 r8 gs8 fs e fs16 fs ~ |
  fs4 r4 r2 |
}

allTheLyrics = \lyricmode {
   Lay -- ing wide a -- wake, __  no -- thing seems to change. __
   All I've got to say __ is ne -- ver worth the time. __
}

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


vox = \new Staff \with { midiInstrument = "voice oohs" midiMinimumVolume = #0.7 } {
  <<
    \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 ef gf bf>1-\markup { \super { "ø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 bf>1-\markup { "7" }
  <c e g b>1-\markup { "maj7" }
  <c ef g bf>1-\markup { "m7" }
  <c f g>1-\markup { "sus4" }
  <c d g>1-\markup { "sus2" }
  <c e g bf df'>1-\markup { "7" \super { \flat "9" } }
  <c e g f'>1-\markup { "add11" }
}

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

verseChords = \chordmode {
  \repeat unfold 2 { cs1:m9 | gs:1.3-.5.6- | }
  b:1.3.5.11 | a:maj9 | e:1.2.4.5 | e |
  fs:m | e | fs:m | gs2:1.4.5.7.9- gs |
}

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

  \verseChords
  \verseChords

}

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

\score {

  <<
    \chordNames
    \vox
    \demLyrics
    \guitarOneStaff
  >>
  \layout {
    indent = 0
    \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 {}
}