\version "2.22.2"
\language "english"

\header {
  title = "Rond de Landeda"
  subtitle = "Sonerien Lanhouarne"
  copyright = "Michel Côme (2019)"
}

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

global = {
  \key g \major
  \numericTimeSignature
  \time 3/4
  \tempo 4=120
}

chordNames = \chordmode {
  \global
  % Ajouter ici des chiffrages.
  
}

themeI = \relative c' {
  \global
  \transposition bf
  % En avant la musique !
  \bar ".|:"
  \repeat volta 2 {  
  fs8 e d4 d8 d e8 g fs4 e8 fs16 g fs8 e d4 d8 d }
  \alternative {
    {e8 g fs4 e8 fs16 g}
    {e8 g fs4 e4}
    }
  \break
  \repeat volta 2 { 
  fs4 fs8 e e d e fs16 g fs8 e fs d fs4 fs8 e e d }
  \alternative {{e8 fs16 g fs8 e d4\bar "||"}}
}  

themeII = \relative c' {
  \global
  \transposition bf
  % En avant la musique !
  \bar ".|:"  \repeat volta 3 {
  fs8 a g4 g8 fs e8 fs g4 fs8 fs16 g fs8 a g4 g8 fs e d fs4 e
  \break
  d4 fs8 fs a g e g16 g g8 g fs fs d4 fs8 fs a g 
  e8 g16 g g8 fs d4   \break
  d4 fs8 fs a g e g16 16 g8 g fs fs d4 fs8 fs a g
  }
  \alternative {   
    {e8 g16 g g8 fs d fs16 g}  
    {e8 g16 g g8 fs d4~ d4 r1 r r \bar "||" }}

  }


chordsPart = \new ChordNames \chordNames

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

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

\markup {  Premier Theme }
\score {
  <<
    \chordsPart
    \themeIPart
  >>
  \layout { }

}

\markup {  Deuxieme Theme }
\score {
  <<
    \chordsPart
    \themeIIPart
  >>
  \layout { }
}
\score {\unfoldRepeats
  <<
    \chordsPart
    \themeIPart
  >>
  \midi { }
}