\version "2.24.4"
\language "english"

\header {
  title = "Valse_Vieux_Leon"
  composer = "G.Brassens"
}

\paper {
  % Add space for instrument names
  indent = 18\mm
}

\layout {
  \context {
    \Voice
    \consists "Melody_engraver"
    \consists "Ambitus_engraver"
    \override Stem.neutral-direction = #'()
  }
}

global = {
  \key a \minor
  \numericTimeSignature
  \time 3/4
  \partial 2.
}

chordNames = \chordmode {
  \global
  % Ajouter ici des chiffrages.
  s2.
  \repeat volta 2 { 
  a2.:m a:m f g c c c  g:m a:7 d:m
  }
  \alternative {
    { a:m f e:7 e:7 e:7 e:7 }
    {a2.:m e:7 a:m a:m a:m e:7 } }
    \repeat volta 2 { 
  a2.:m g:7 c a:7 a:7 d:m  d:m g:7 c 
  }
  \alternative {
    {f2. d:m d:m e:7 e:7 e:7 e:7 }
    {f2. d:m e:7 e:7 a:m s } }
}

flute = \relative c' {
  \global
  % En avant la musique.
  a4^"couplet" c d
  \repeat volta 2 { 
  e2. a,4 c e a2. f4 g a g2.~g~g bf4 g bf a2. f4 d g  
  }
  \alternative {
    { e2 c4 a2 d4 b2. ~ b ~ b a4 c d}
    { e2. b4 e b a2. ~ a ~ a b4 e d} }
  \break
    \repeat volta 2 { 
  c2.^"refrain" d4 g f e2. a a,2 a'4 f2. ~ f d4 g f e2.
  
  }
  \alternative {
    {e4 f e d2. e4 d c b2.~ b ~ b b4 e d }
    { a'4 e a d,2. e2. gs4 fs gs a2. } }
  a,4 c d
}

chordsPart = \new ChordNames {  
    \set chordChanges = ##t \chordNames}

flutePart = \new Staff \with {
  instrumentName = "Ut"
  midiInstrument = "flute"
} \flute

\score {
  <<
    \chordsPart
    \flutePart
  >>
  \layout { }
}

\score {\unfoldRepeats
  <<
    \chordsPart
    \flutePart
  >>
  \midi {    \tempo 4=120   }
}
