\version "2.24.1"
\language "english"

\header {
  subtitle = "Bourrée 2T Cotitintouille - MTM"
}

\paper {
  #(set-paper-size "a4")
}

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

global = {
  \key c \major
  \numericTimeSignature
  \time 2/4
}

chordNames = \chordmode {
  \global
  % Ajouter ici des chiffrages.
  \repeat volta 2 {
  a4 g a4. a8  g4 g a a 
  a g a2  g4 g a2 }
  \repeat volta 2 { 
  a4 f c2 e4 e a a 
  a f c2 e4 e a2 }
  
}

flute = \relative c'' {
  \global
  % En avant la musique.
 \repeat volta 2 { 
   c4 b8 c a4. c8 b8. b16 d8 b c8 a a4
   c4 b8 c a2 g8. b16 g8. b16 a2
 } 
 \break
 \repeat volta 2 { 
   a4 f'4 e2 b8. d16 c8 b c a a4
   a4 f'4  e2 b8. d16 c8 b a2
 }
}

chordsPart = \new ChordNames
% \transpose c d 
  \chordNames

flutePart = \new Staff \with {
  instrumentName = "Fl."
  midiInstrument = "flute"
} % \transpose c d 
\flute

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

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

  \midi {
    \tempo 4=140
  }
}