\version "2.24.3"
\language "english"

\header {
  title = "John Ryan‘s Polak"
  arranger = "Patrick Steinbach"
}

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

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

global = {
  \key d \major
  \time 4/4
}

chordNames = \chordmode {
  \global
  % Ajouter ici des chiffrages.
  \repeat volta 2 { 
  d2 g d a d g a1
  d2 g d2 d d a d1
  }
  \repeat volta 2 { 
  d2 d a a d d a a 
  d2 d a a d a d1
  }
}

violin = \relative c'' {
  \global
  % En avant la musique.
  \repeat volta 2 { d4 d b8 cs d b a4 fs e d 
  d'4 d b8 cs d b a4 fs e2
  d'4 d b8 cs d b a4 fs a d8 e 
  fs4 d e cs d2 d }
  \break
 \repeat volta 2 { 
 fs4 d d e8 fs g4 fs e d8 e 
 fs4 d d e8 fs e4 d b a
 fs'4 d d e8 fs g4 fs e d8 e fs4 d e cs d2 d } 
}

chordsPart = \new ChordNames \chordNames

violinPart = \new Staff \with {
  instrumentName = "Vl."
  midiInstrument = "violin"
} \violin

\markup "En Ré majeur"
\score {
  <<
    \chordsPart
    \violinPart
  >>
  \layout { }
}
%
\markup "En Do majeur"
\score {
  <<
    \transpose d c \chordsPart
    \transpose d c \violinPart
  >>
  \layout { }
}


\score {\unfoldRepeats
  <<
    \chordsPart
    \violinPart
  >>
  \midi {    \tempo 4=150  }
}