%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm,paper-height=845.047\pt,paper-width=597.508\pt,papersize='(cons (* 597.508 pt) (* 845.047 pt))]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************

#(ly:set-option 'eps-box-padding 3.000000)



\paper {
  #(set-paper-size '(cons (* 597.508 pt) (* 845.047 pt)))
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}




% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "/lilypond-2.27.1/input/regression/musicxml/11i-TimeSignatures-Alternate.xml"
\sourcefileline 0
\version "2.27.1"
% automatically converted by musicxml2ly from -
\pointAndClickOff

%% additional definitions required by the score:
#(define ((time-alternate t ta type) grob)
   (let ((m1 (grob-interpret-markup grob (markup #:compound-meter t)))
         (m2 (grob-interpret-markup grob (markup #:compound-meter ta))))
     (ly:stencil-combine-at-edge
      m1 X RIGHT
      (case type
        ((bracket)
         (bracketify-stencil m2 Y 0.15 0.4 0 0.4))
        ((space)
         m2)
        ((equals)
         (ly:stencil-combine-at-edge
          (grob-interpret-markup grob (markup #:lower 1.0 #:number "="))
          X RIGHT m2 0.1))
        ((hyphen)
         (ly:stencil-combine-at-edge
          (grob-interpret-markup grob (markup #:lower 0.55 #:number "–"))
          X RIGHT m2 0))
        ((slash)
         (ly:stencil-combine-at-edge
          (grob-interpret-markup grob (markup #:lower 1.0 #:number "/"))
          X RIGHT m2 0.2))
        (else
         (parenthesize-stencil m2 0.1 0.4 0.4 0.1)))
      (case type
        ((space) 0.7)
        ((equals) 0.1)
        ((hyphen) 0)
        ((slash) 0.2)
        (else 0.4)))))

timeAlternate =
#(define-music-function (t ta type)
   (time-signature? time-signature? symbol?)
   #{
     \once \override Timing.TimeSignature.stencil = #(time-alternate t ta type)
     \time #t
   #})


\header {
  texidoc = "Time signatures with alternates using <interchangeable>.

    ‘3/4 (6/8)’, ‘2/2 [4/4]’, ‘4/4 = 7/8+1/8’, ‘3/4 – 6/8’, ‘2/2 / 4/4’, ‘3/4
    6/8’."
}
\layout {
  \context {
    \Staff
    printKeyCancellation = ##f
  }
  \context {
    \Score
    autoBeaming = ##f
  }
}
PartPOneVoiceOne = \relative b' {
  \clef "treble" \timeAlternate #'(3 . 4) #'(6 . 8) #'parentheses \key c \major
  b2. | % 1
  \numericTimeSignature \timeAlternate #'(2 . 2) #'(4 . 4) #'bracket b1 | % 2
  \numericTimeSignature \timeAlternate #'(4 . 4) #'((7 . 8) (1 . 8)) #'equals b1
  | % 3
  \timeAlternate #'(3 . 4) #'(6 . 8) #'hyphen b2. | % 4
  \numericTimeSignature \timeAlternate #'(2 . 2) #'(4 . 4) #'slash b1 | % 5
  \timeAlternate #'(3 . 4) #'(6 . 8) #'space b2. \bar "|."
}


% The score definition
\score {
  <<
    \new Staff = "P1" <<
      \context Staff <<
        \override Staff.BarLine.allow-span-bar = ##f
        \mergeDifferentlyDottedOn
        \mergeDifferentlyHeadedOn
        \context Voice = "PartPOneVoiceOne" {
          \PartPOneVoiceOne
        }
      >>
    >>
  >>
  \layout {}
  % To create MIDI output, uncomment the following line:
  % \midi { \tempo 4 = 100 }
}




% ****************************************************************
% end ly snippet
% ****************************************************************
