\version "2.24.0"
\language "english"

\header {
  title = "Scottish du pays de Retz"
%  subsubtitle = "Traditionnel breton"
}

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

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

chordNames = \chordmode {
  \global
  % Ajouter ici des chiffrages.
  \repeat volta 2 {
  a2:m a:m
  g2 g
  e e
  
  \alternative {
    {a:m a:m} 
    {a:m a:m}
  }	}
  \repeat volta 2 {
    a2:m f
    c e
    e e
  
  \alternative {
    { a:m a:m}{ a:m a:m}
  }  }
}
clarinet = \relative c'' {
  \global
  \transposition bf
  % En avant la musique !
  \repeat volta 2 {
    a8 b c d c4 c
    b8 c d c b2
    e4 b e b
 
  \alternative{
    { c8 d c b c4 a4}
    { c8 d c b a2}
  } }
    \repeat volta 2 {
    e'4 d8 e f4 f
    e8 d c d 
    e4 e
    e4 b e b
  
  \alternative{
    { c8 d c b c4 a }
    { c8 d c b a2}
  }}
  
}
voixB = \relative c' {
  \global
  \repeat volta 2 {  
  c4 d8 e c4 d8 e d4 d e4 d4 e8 e f e d c b4
   }

\alternative {
  \volta 1 {a8 b c4 d e}
  \volta 2 {a8 b c b a2}}

\repeat volta 2 { 
e4 a8 c e,4 a8 c b4 g e2 e8 e f e d c b4
}
\alternative {
    \volta 1 {a8 b c4 d e}
    \volta 2 { a8 b c4 b a}
  }
}
voixC = \relative c' {
  \global
  \repeat volta 2 { 
  e4 c'2. b8 g8 g4 g2 e4 b'2 b4
  }
  \alternative {
    \volta 1 { a8 b c2 a4 }
    \volta 2 {  a8 g a2.}
    }
  \repeat volta 2 { 
  a1 g1 e'4 b2 d4 
  }
  \alternative {
    \volta 1 { c4 b8 c c4 a4 }
    \volta 2 { c4 b8 a8 ~ a2}
    }
}


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


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

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

voixBPart = \new Staff \with {
  instrumentName = "Ut2"
  midiInstrument = "oboe"
} \voixB

voixCPart = \new Staff \with {
  instrumentName = "Ut3"
  midiInstrument = "guitar "
} \voixC

%   pour jouer à la tierce
amScale = \relative {  a b c d e f g  }
tierce = \modalTranspose c e \amScale \clarinet
tiercePart = \new Staff 
    \with {instrumentName = "Ut+3"     } 
    \tierce
%voixIITierce =  \modalTranspose c e \amScale \voixII
%{voixIITPart = \new Staff 
    \with {instrumentName = "voix 2 +3"     } 
    \voixIITierce
   %} 
%
%\markup "voir en dessous pour les voix séparées "
\score {
  <<
 \transpose c d     \chordsPart
  \transpose c d     \clarinetPart
  \transpose c d     \voixBPart
   \transpose c d    \voixCPart
  >>
  \layout { }  
}

\markup "on peut essayer de jouer une partie à la tierce, mesures 1 & 2 OK "
\score {          \tiercePart }
%
\score {
  <<
   \transpose c d    \chordsPart
  \transpose c d     \clarinetPart
  %  \voixBPart
   % \voixCPart
  >>
  \layout { }
  
}
\score {
  <<
   \transpose c d    \chordsPart
   % \clarinetPart
    \transpose c d   \voixBPart
   % \voixCPart
  >>
  \layout { }
  
}
\score {
  <<
   \transpose c d    \chordsPart
  %  \clarinetPart
   % \voixBPart
   \transpose c d    \voixCPart
  >>
  \layout { }
  
}



\score {\unfoldRepeats {
  \ticks
  <<
    \chordsPart
   % \voixBPart
    \voixCPart
   % \transpose c d 
  %  \clarinetPart
  >>
        }
  \midi { \tempo 4 = 130  }
}
\book {
  \bookOutputSuffix "voix3"
  \score {
  <<
   \chordsPart
  %  \clarinetPart
   % \voixBPart
    \voixCPart
  >>  
   \midi { \tempo 4 = 130  }
  }
}
\book {
  \bookOutputSuffix "voix2"
  \score {
  <<
   \chordsPart
  %  \clarinetPart
    \voixBPart
   % \voixCPart
  >>  
   \midi { \tempo 4 = 130  }
  }
}
\book {
  \bookOutputSuffix "voix1"
  \score {
  <<
   \chordsPart
    \clarinetPart
   % \voixBPart
   % \voixCPart
  >>  
   \midi { \tempo 4 = 130  }
  }
}
%{
convert-ly (GNU LilyPond) 2.24.4  convert-ly: Processing `'...
Applying conversion: 2.21.0, 2.21.2, 2.22.0, 2.23.1, 2.23.2, 2.23.3,
2.23.4, 2.23.5, 2.23.6, 2.23.7, 2.23.8, 2.23.9, 2.23.10, 2.23.11,
2.23.12, 2.23.13, 2.23.14, 2.24.0
%}
