\version "2.18.2"
\language "english"

\header {
  title = "Trypto"
  composer = "Tommy Montgomery"
  copyright = "(c) 2020 Tommy Montgomery"
}

global = {
  \key a \minor
  \set Staff.printKeyCancellation = ##f
  \numericTimeSignature
  \compressFullBarRests
  \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
  \time 4/4
  \tempo 4 = 94
}

guitarOne = \relative c' {
  \partial 8 \xNotesOn a16 a \xNotesOff |

  a8 a16 a c b a ef' ~ ef a, d a c b a g |
  a8 a16 a c b a ef' ~ ef a, d a c b a g |
}

vocalMelody = \relative c'' {

}

allTheLyrics = \lyricmode {
  lol
}

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 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
)

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

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 {}
}