%% 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.26.0/input/regression/musicxml/34c-Font-Size.xml"
\sourcefileline 0
\version "2.26.0"
% automatically converted by musicxml2ly from -
\pointAndClickOff

%% additional definitions required by the score:
% \accs-ornament
% --------------
%
% Position the `above` and `below` markup lists as vertical stacks
% above and below markup `script`, respectively.  `above` and `below`
% are by default horizontally centered on `script` (controlled by the
% property `acc-dir`), printed at a size given by the property
% `acc-font-size` (default value -5), and a color given by the
% property `acc-color` (default is black).  Between all markups a
% vertical space given by the property `acc-padding` (default value
% 0.2) is inserted.  The `above` stack grows from bottom to top, while
% the `below` stack grows from top to bottom.
%
% If either `above` or `below` is an empty argument, or if `script` is
% set to `#f`, the corresponding argument is not printed.
%
% If an element of `above`, `script`, or `below` is a plain string,
% check the following.
%
% * If the string consists entirely of one or more characters from the
%   accidental set '♮♭♯𝄪𝄫' (not counting a possible enclosure), add
%   `\number` internally as a prefix to use the Emmentaler font.
%
% * Otherwise the element is taken as a glyph name (again not counting
%   a possible enclosure), to be internally accessed with the
%   `\musicglyph` command.
%
% * (Not for `script`.)  If an element of `above` or `below` is a
%   plain string and the first and last character is `(` and `)`,
%   respectively, the element gets enclosed in parentheses.  The same
%   holds for `[` and `]`, enclosing the element in brackets.  The
%   font size of the enclosure characters is controlled by the
%   property `enclosure-font-size` (default value -2).
%
% Example:
%
% ```
% \markup \override #'(acc-padding . 0.5)
%         \accs-ornament { "♭" "(♯)" } "scripts.haydnturn" {}
% ```

#(define-markup-command (accs-ornament layout props
                                       above script below)
   (markup-list? markup? markup-list?)
   #:properties ((acc-font-size -5)
                 (acc-color black)
                 (acc-padding 0.3)
                 (acc-dir CENTER)
	         (enclosure-font-size -2))

   (define enclosure-regex
     ;; `(?(-3) ...)` is a 'conditional subpattern' that is only
     ;; considered for matching if the subpattern three opening
     ;; parentheses earlier (i.e., the first group) matches.
     (ly:make-regex "(?x) ^ ( [([] ) ?
                            ( [^]()[] + )
                            ( (?(-3) [])] ) ) $"))

   (define charset:accidentals (string->char-set "♮♭♯𝄪𝄫"))

   (define (musicglyph-or-number-markup arg)
     (if (string-every charset:accidentals arg)
         (make-number-markup arg)
         (make-musicglyph-markup arg)))

   (define (with-enclosure-markup arg)
     (let ((match (ly:regex-exec enclosure-regex arg)))
       (if match
           (let* (;; `left` is `#f` if there is no enclosure.
                  (left (ly:regex-match-substring match 1))
                  (left (if left
                            (make-normalsize-markup
                             (make-fontsize-markup
                              enclosure-font-size left))
                            #f))
                  (glyph (ly:regex-match-substring match 2))
                  ;; `right` is `""` if there is no enclosure.
                  (right (ly:regex-match-substring match 3))
                  (right (if (string-null? right)
                             #f
                             (make-normalsize-markup
                              (make-fontsize-markup
                               enclosure-font-size right)))))
             (make-concat-markup
              (list
               (or left "")
               (musicglyph-or-number-markup glyph)
               (or right ""))))
           #f)))

   (define (to-markup arg enclosure)
     (if (string? arg)
	 (if (string-null? arg)
             #f
             (if enclosure
                 (with-enclosure-markup arg)
                 (musicglyph-or-number-markup arg)))
         arg))

   (define (make-acc-stencil arg)
     (if arg
         (interpret-markup
          layout props
          (make-halign-markup
           acc-dir
           (make-with-color-markup
            acc-color
            (make-fontsize-markup
             acc-font-size arg))))
         #f))

   (let* ((above (map (lambda (x) (to-markup x #t)) above))
          (above-stils (map (lambda (x)
                              (make-acc-stencil x))
                            above))

          (script (to-markup script #f))
          (script-stil (if script
                           (interpret-markup layout props script)
                           empty-stencil))

          (below (map (lambda (x) (to-markup x #t)) below))
          (below-stils (map (lambda (x)
                              (make-acc-stencil x))
                            below))

          (script-stil (fold (lambda (elem previous)
                               (ly:stencil-combine-at-edge
                                previous Y UP elem acc-padding))
                             script-stil
                             above-stils))
          (script-stil (fold (lambda (elem previous)
                               (ly:stencil-combine-at-edge
                                previous Y DOWN elem acc-padding))
                             script-stil
                             below-stils)))
     script-stil))


% \acc-ornament
% -------------
%
% This function behaves similar to `\accs-ornament` with the
% difference that `above` and `below` are single markups, not markup
% lists.  If one of the arguments is an empty string, it is not
% printed.
%
% Example:
%
% ```
% \markup \acc-ornament "[♭]" "scripts.turn" ♯
% ```

#(define-markup-command (acc-ornament layout props
                                      above script below)
   (markup? markup? markup?)
   #:properties (accs-ornament-markup)
   (accs-ornament-markup layout props
                         (if (and (string? above) (string-null? above))
                             '()
                             (list above))
                         (if (and (string? script) (string-null? script))
                             #f
                             script)
                         (if (and (string? below) (string-null? below))
                             '()
                             (list below))))


% Some shorthands to make the usage of `\acc-ornament` more
% comfortable for simple cases.


ornament =
#(define-music-function (above script below)
   (string? string? string?)
   #{
     \tweak parent-alignment-X #CENTER
     \tweak self-alignment-X #CENTER
     -\markup \acc-ornament #above #script #below
   #})


accTrill =
#(define-music-function (above)
   (string?)
   #{
     \tweak parent-alignment-X #CENTER
     \tweak self-alignment-X #CENTER
     -\markup
        \override #'((acc-dir . -1.3)
                     (acc-padding . -0.4))
        \acc-ornament #above "scripts.trill" ""
   #})


#(define-markup-command (trill-acc-tweak layout props above)
   (string?)
   (interpret-markup
    layout props
    #{
      \markup
        \override #'((acc-dir . -1.3)
                     (acc-padding . -0.4))
        \with-dimension-from #X
          \with-true-dimension #X \musicglyph "scripts.trill"
            \acc-ornament
              #above
              \with-true-dimension #X \musicglyph "scripts.trill"
          ""
    #}))


% `color` and `size` are optional.  If `size` is present, `color` must
% be present, too.  `size` also sets the `enclosure-font-size`
% property (three magsteps larger).
trillTweak =
#(define-music-function (acc color size music)
   (string? (color? black) (number?) ly:music?)
   (let* ((override (list `(acc-color . ,color)))
          (override (if size
                        (cons `(enclosure-font-size . ,(+ size 3))
                         (cons `(acc-font-size . ,size) override))
                        override)))
     #{
       \tweak bound-details.left.text
         \markup \override #override
                   \trill-acc-tweak #acc
       #music
     #}))

Cresc = #(make-music 'CrescendoEvent 'span-direction START
                                     'span-type 'text)

RH = \rightHandFinger \etc

#(define-markup-command (square layout props arg)
   (markup?)
   (let* ((stil (interpret-markup layout props arg))
          (x-size (interval-length (ly:stencil-extent stil X)))
          (y-size (interval-length (ly:stencil-extent stil Y)))
          (axis (if (> x-size y-size) Y X)))
     (interpret-markup
      layout props
      #{
        \markup \box \with-dimension-from #axis \rotate #90 #arg #arg
      #})))

% Change the number of staff lines to `num-lines`.
%
% The argument `clef` makes the function emit a clef with the given
% name.  If `clef` contains the substring `"percussion"` or `"tab"`,
% use both even and odd staff line positions.  If set to `""`, do the
% same but don't set `Staff.clefPosition` (which means that no clef
% gets triggered).  If `clef` is set to any other value, use even
% staff line positions only and set `Staff.clefPosition`, which
% triggers a clef if its value changes.
%
% The optional argument `properties` is an alist of properties to
% control the appearance of both the staff and the clef:
%
% * `details` is a list of staff line numbers that should be
%   displayed.  An empty list suppresses any display of staff lines;
%   omitting the argument means to display all lines.
% * `staff-color` holds the color of the staff.
% * `clef-font-size` holds the font size of the clef
% * `clef-color` holds the color of the clef.
%
% \staffLines [<properties>] <clef> <num-lines>

staffLines =
#(define-music-function (properties clef num-lines)
                        ((alist? '()) string? index?)
   (let* ((details (assoc-get 'details properties #f))
          (staff-color (assoc-get 'staff-color properties #f))
          (clef-color (assoc-get 'clef-color properties #f))
          (clef-font-size (assoc-get 'clef-font-size properties #f))
          (lines (or details (iota num-lines 1)))
          (only-even-pos (not (or (equal? clef "")
                                  (string-contains clef "percussion")
                                  (string-contains clef "tab"))))
          (offset (if only-even-pos
                      (if (even? num-lines) 1 0)
                      0))
          ;; MusicXML counts staff lines from the bottom.
          (delta (- -1 num-lines offset))
          (positions (filter (lambda (x) (<= x num-lines))
                             lines))
          (positions (map (lambda (x) (+ delta (* x 2)))
                      positions)))
     #{
       \stopStaff

       #(if staff-color
            #{
              \once \override Staff.StaffSymbol.color = #staff-color
            #})
       #(if clef-color
            #{
              \once \override Staff.Clef.color = #clef-color
            #})
       #(if clef-font-size
            #{
              \once \override Staff.Clef.font-size = #clef-font-size
            #})

       #(if (equal? clef "")
            #{
              \unset Staff.middleCPosition
              \unset Staff.middleCClefPosition
              % To suppress the clef inserted by default by LilyPond at the
              % beginning of a piece.
              \once \omit Staff.Clef
            #}
            #{ \clef #clef #})

       \override Staff.StaffSymbol.line-positions = #positions

       \applyContext
       #(lambda (ctx)
          (let* ((c (ly:context-find ctx 'Staff))
                 (clef-p (ly:context-property c 'clefPosition))
                 (middle-c-p (ly:context-property c 'middleCPosition))
                 (middle-c-clef-p (ly:context-property c 'middleCClefPosition))
                 (use-offset (not (string-contains clef "percussion")))
                 (delta (+ delta (if use-offset 6 0))))
            (when only-even-pos
              (ly:context-set-property! c 'clefPosition (+ clef-p delta))
              (ly:context-set-property! c 'forceClef #t))
            (ly:context-set-property! c 'middleCPosition (+ middle-c-p delta))
            (ly:context-set-property! c 'middleCClefPosition
                                      (+ middle-c-clef-p delta))))
       \startStaff
     #}))

D = \tweak Stem.direction #DOWN \etc
U = \tweak Stem.direction #UP \etc


\header {
  texidoc = "Font sizes. The elements in the first bar have the ‘font-size’
    attribute set to a larger value for <note>, <notehead>, <trill-mark>, <dot>,
    and <accidental>, respectively.

    The elements in the second bar have the ‘font-size’ attribute set to a
    larger value for <down-bow>, <accidental-mark>, <accent>, and <note> again
    (for the rest), respectively, followed by a larger percussion clef and a
    larger unpitched note.

    The third and fourth bar consists of an oversized two-bar rest.

    The fifth bar has an oversized rehearsal mark on its starting bar line. The
    first note has three fingerings, with the middle one oversized; also
    attached is an oversized ‘ff’ sign. The second note has three plucks, with
    the first one oversized. An oversized ‘Adagio’ tempo indication is on top of
    the third and fourth beats, which consist of a quadruplet with an oversized
    number. The fifth beat demonstrates oversized lyrics.

    The sixth bar holds an oversized pedal marker with an oversized octave
    shift, an oversized trill with a wavy line, and an oversized ‘cresc.’ with
    dashes.

    The seventh measure demonstrates an oversized, non-traditional key change,
    followed by an oversized 6/8 time signature, an oversized breath mark, an
    oversized bass clef, and an oversized, traditional key change."
}
\layout {
  \context {
    \Staff
    printKeyCancellation = ##f
    \override MultiMeasureRest.expand-limit = 1
  }
  \context {
    \Score
    skipBars = ##t
    autoBeaming = ##f
  }
}
PartPOneVoiceOne = \relative gis' {
  \clef "treble" \time 15/8 \key c \major \tweak font-size #8.717 \tweak
  Accidental.font-size #8.717 \tweak Dots.font-size #8.717 gis4. -\tweak
  font-size #8.717 _\downbow -\tweak font-size #8.717 -\tweak parent-alignment-X
  #CENTER -\tweak self-alignment-X #CENTER ^\markup \accs-ornament { \normalsize
    \fontsize #8.717 \number "𝄪" } \musicglyph "scripts.trill" { } \tweak
  font-size #8.717 -> \tweak font-size #8.717 ges4. _\downbow ^\accTrill "𝄪" ->
  \U fis4. _\downbow -\tweak font-size #8.717 ^\accTrill "𝄪" -> \tweak
  Dots.font-size #8.717 fes4. _\downbow ^\accTrill "𝄪" -> \tweak
  Accidental.font-size #8.717 eis4. _\downbow ^\accTrill "𝄪" -> | % 1
  gis4. -\tweak font-size #8.717 _\downbow ^\accTrill "𝄪" -> ges4. _\downbow
  -\tweak parent-alignment-X #CENTER -\tweak self-alignment-X #CENTER ^\markup
  \accs-ornament { \normalsize \fontsize #8.717 \number "𝄪" } \musicglyph
  "scripts.trill" { } -> fis4. _\downbow ^\accTrill "𝄪" \tweak font-size #8.717
  -> \once \override Dots.font-size = #8.717 \once \override Rest.font-size =
  #8.717 r4. \staffLines #'((clef-font-size . 8.717)) "percussion" 5 \tweak
  font-size #8.717 \tweak Dots.font-size #8.717 b4. \break | % 2
  \tweak font-size #8.717 \tweak MultiMeasureRestNumber.font-size #8.717 R8*15*2
  | % 4
  \clef "treble" \mark \markup \square \fontsize #8.717 A f4. -\finger \markup
  \concat { "0" \normalsize \fontsize #8.717 "1" "2" } -\tweak font-size #8.717
  -\ff f4. ^\RH \markup \concat { \normalsize \fontsize #8.717 a \char ##x200A m
    \char ##x200A i } \tweak TupletNumber.font-size #8.717 \tweak
  TupletNumber.text #(tuplet-number::append-note-wrapper
  (tuplet-number::non-default-tuplet-fraction-text 4 2) (ly:make-duration 2 1
  1)) \tuplet 4/2 {
    f4*3/2 ^\markup \fontsize #8.717 \bold Adagio f4*3/2 f4*3/2 f4*3/2 }
  f4. \break | % 5
  \tweak font-size #8.717 \ottava #1 f'8 [ \tweak font-size #8.717 \sustainOn f8
  f8 ] <> \sustainOff \ottava #0 f,4. \tweak bound-details.left.text \markup
  \normalsize \fontsize #8.717 \with-true-dimension #X \musicglyph
  "scripts.trill" \startTrillSpan f4. \stopTrillSpan f4. \tweak text \markup
  \normal-text \fontsize #8.717 \italic "cresc." ^\Cresc f4. | % 6
  \once \override Staff.TimeSignature.font-size = #8.717 \time 6/8 \set
  Staff.keyAlterations = #`((1 . ,SHARP) (5 . ,SHARP) (0 . ,SHARP)) \once
  \override Staff.KeySignature.font-size = #8.717 <>\! f4. \tweak font-size
  #8.717 \breathe \once \override Staff.Clef.font-size = #8.717 \clef "bass"
  \tweak font-size #8.717 \key bes \major f,4. \bar "|."
}

PartPOneVoiceOneLyricsOne = \lyricmode {
  \set ignoreMelismata = ##t
  \set includeGraceNotes = ##t
  \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1
  \skip1 \skip1 \skip1 \skip1 \markup \fontsize #8.717 lyrics \skip1 \skip1
  \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1
}


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




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