\version "2.24.1"
\language "english"

\header {
  title = "The Milking Stool"
  composer = "Pascal Rubens"
}

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

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

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

chordNames = \chordmode {
  \global
  % Ajouter ici des chiffrages.
  \repeat volta 2 { a2.:m  a:m g a:m
 a:m a:m g   }
 \alternative {{a:m}{a:m}}
 \repeat volta 2 {
 f2. g c2 e4:m a2.:m
 f g c2 e4:m a2.:m}
}

clarinet = \relative c' {
  \global
%  \transposition bf
  % En avant la musique.
  \repeat volta 2 {  
  e4 a8 e b' e, c'4. c8 b c d c b4 d c b a
  e4 a8 e b' e, c'4. c8 b c d c b4 g  }
  \alternative {{a2.}{a4. b8 c d}}
  \repeat volta 2 {
  f4 f8 e d c b4 b8 c d f e4 e8 d c b c4 a2
  f'4 f8 e d c b4 b8 c d f e4 d c8 b a2.}
}

chordsPart = \new ChordNames \chordNames

clarinetPart = \new Staff \with {
  instrumentName = "Cl."
  midiInstrument = "clarinet"
} \clarinet

\score {
  <<
    \chordsPart
    \clarinetPart
  >>
  \layout { }
}
\score { \unfoldRepeats
  <<
    \chordsPart
    \clarinetPart
  >>

  \midi {\tempo 4=140 }
}