\version "2.24.4"
\language "english"

\header {
  title = "Ridée 6 temps -suite de 2"
  arranger = "Jannkin"
  copyright = "https://www.diatonalpartitions.fr/partitions/musique-bretonne/ridée-6t-suite-grandjean" 
}

\paper {
  % Add space for instrument names
  indent = 20\mm
}

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

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

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

fluteA = \relative c'' {
  \global
  % En avant la musique.
  a8 b c4 d c8 e e c b b a8 b c4 d c8 e e c b4 
  a8 b c4 d c8 e e c b b a8 b c4 d c8 e e c b4 
  a8 b c4 a g8 a b d c b a8 b c4 a g8 a b c a4
  a8 b c4 a g8 a b d c b a8 b c4 a g8 a b c a4 
}

violinA = \relative c'' {
  \global
  % En avant la musique.
  r1. r a2 b4 a e8 fs g4 a2 g4 e2 e4
  r1. r c4 e c d g e8 d c4 e c b8 a g4 a4
}

chordsAPart = \new ChordNames 
\transpose c d \chordNamesA

fluteAPart = \new Staff \with {
  instrumentName = "Bb"
  midiInstrument = "flute"
} \transpose c d  \fluteA

violinAPart = \new Staff \with {
  instrumentName = "Bb"
  midiInstrument = "cello"
} \transpose c d \violinA
\markup " Theme A "
\score {
  <<
    \chordsAPart
    \fluteAPart
    \violinAPart
  >>
  \layout { }
}


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

fluteB = \relative c'' {
  \global
  % En avant la musique.
  a8 g a b c4 b8 c d c b b a g a b c4 b8 c d c b4
  a8 g a b c4 b8 c d c b b a g a b c4 b8 c d c b4
  e,8 a a fs g4 \tuplet 3/2 {a8 b c } b a g fs 
  e8 a a fs g4 \tuplet 3/2 { a8 b c } b8 g a4 
  e8 a a fs g4 \tuplet 3/2 {a8 b c } b a g fs 
  e8 a a fs g4 \tuplet 3/2 { a8 b c } b8 g a4  
}

violinB = \relative c'' {
  \global
  % En avant la musique.
  r1. r a8 b c4 e2 d4 e4~ e e8 g a4 a g8 d e4
  c2 b4 a g8 a b4 c2 b4 a4 g a 
  c2 b4 a g8 a b4 c2 b4 a g a 
}

chordsBPart = \new ChordNames 
  \transpose c d \chordNamesB

fluteBPart = \new Staff \with {
  instrumentName = "Bb"
  midiInstrument = "flute"
} \transpose c d \fluteB

violinBPart = \new Staff \with {
  instrumentName = "Bb"
  midiInstrument = "cello"
} \transpose c d \violinB
\markup " Theme B  "
\score {
  <<
    \chordsBPart
    \fluteBPart
    \violinBPart
  >>
  \layout { }
}

\score {\unfoldRepeats {
  <<
    \chordsAPart
    \fluteAPart
    \violinAPart
  >>
    <<
    \chordsBPart
    \fluteBPart
    \violinBPart
  >>
        }
  \midi {
    \tempo 4=160
  }
}
