\version "2.20.0"
\language "english"

\header {
  title = "Branlou"
}

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

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

chordNames = \chordmode {
  \global
  % Ajouter ici des chiffrages.
 \repeat volta 2 {
 c4 g g g c g }
 \alternative {{c g}{c c}}
  \repeat volta 2 {
    f4 c g c g c}
 \alternative {{g4 c}{c c }}
}

clarinet = \relative c'' {
  \global
  \transposition bf
  % En avant la musique !
  \repeat volta 2 {
    c8 b16 c d8 g
    f8 e d4
    c8 b16 c d8 g
  }
  \alternative  {
    {g4 d }
    {g4 c,8 d16 e}}
  \repeat volta 2 {
    f8 d e c
    d8 b c d16 e
    f8 d e c}
  \alternative {
    {d4 c8 d16 e }
    {d4 c}
  }
}
ticks =\new Staff \with {
  midiInstrument = #"woodblock"
} \relative c' {
 c2. c2.   \repeat volta 3 {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 = 100
  }
}

