\version "2.20.0"
\language "english"

\header {
  title = "Polka a Ménette"
  composer = "Roger Ménétrier"
}

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

global = {
  \key g \major
  \time 2/4
  \tempo 4=100
}

chordNames = \chordmode {
  \global
  % Ajouter ici des chiffrages.
   \repeat volta 2 {
     g4 g4 g4 d4 d4 d4
  }
  \alternative {
    {d4 g4}
    {d4 g4}
  }
   \repeat volta 2 {
     g4 g4 g4 d4 d4 d4
  }
  \alternative {
    {d4 g4}
    {d4 g4}
  } 
}

clarinet = \relative c'' {
  \global
  \transposition bf
  % En avant la musique !
  
   \repeat volta 2 {
   d8 d e16 d c8 b8 b a4 c8 c8 d16 c b8
    
  }
  \alternative {
    {a8 c b g}
    {a8 fs g4}
  }
   \repeat volta 2 {
   e'8 d b16 d b g e8 g fs4 d'8 c8 a16 c a fs  
       }
   
  \alternative {
    {d'8 c b16 d b gs }
    {d'8 fs, g4}
  } 
 
}


ticks =\new Staff \with {
  midiInstrument = #"woodblock"
} \relative c' {
 c2 c2   \repeat volta 2 {c4}
}


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

clarinetPart = \new Staff \with {
  instrumentName = "Cl."
  midiInstrument = "clarinet"
} 
  %\transpose c d 
  \clarinet


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

\score {

  \unfoldRepeats {
  \ticks
  <<
    \chordsPart
    \clarinetPart
  >>
        }
  \midi { %\tempo 4 = 50
  }
}
