%% 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/32a-Notations.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
     #}))

substFinger =
#(define-music-function (start left right)
   (markup? markup? markup?)
   #{
     \tweak self-alignment-X #-0.6
     -\finger \markup
       \concat {
         #start
         \overtie \concat { #left \char ##x2009 #right } }
   #})

harmonicSmall =
  \tweak NoteHead.font-size #-3
  \tweak NoteHead.duration-log #4
  \etc

harmonicParen =
#(define-music-function (size offset music)
   (number? number? ly:music?)
   #{
     \tweak Parentheses.font-size #size
     \tweak Parentheses.Y-offset #offset
     \parenthesize
     #music
   #})

RH = \rightHandFinger \etc


%% additional macros required by the score:
sfffz = #(make-dynamic-script "sfffz")

\header {
  texidoc = "Most <notation> elements defined in MusicXML. The lyrics show the
    notation assigned to each note.

    The third-last bar is a full-measure rest with a fermata.

    A trailing up-arrow indicates a ‘placement=\"above\"’ attribute, and a
    down-arrow means ‘placement=\"below\"’. An exception to that is the
    positioning of the natural below the turn in the first beat of measure 10:
    here, the position is determined by ‘default-y’ attributes."
}
\layout {
  \context {
    \Staff
    printKeyCancellation = ##f
  }
  \context {
    \Voice
    toeHeelStyle = #'standard
  }
  \context {
    \Score
    autoBeaming = ##f
  }
}
PartPOneVoiceOne = \relative c'' {
  \clef "treble" \key c \major c4 ^\fermata c4 _\fermata c4 \fermata c4
  \shortfermata | % 1
  c4 \longfermata <c e g>4 \arpeggio \arpeggioBracket <c e g>4 \arpeggio
  \arpeggioNormal c4 -\tweak parent-alignment-X #CENTER -\tweak self-alignment-X
  #CENTER ^\markup \number "𝄪" \bar "||" % 2
  \break c4 -> c4 -^ c4 -. c4 -- | % 3
  c4 -_ c4 -! c4 -! c4 \break | % 4
  c4 c4 -\bendAfter #4 c4 -\bendAfter #-4 c4 \breathe | % 5
  c4 \caesura c4 c4 c4 \espressivo \bar "||" % 6
  \break c4 ^\trill c4 ^\turn \after 8 ^\turn c4 c4 ^\reverseturn | % 7
  \after 8  ^\reverseturn c4 c4 c4 c4 \break | % 8
  c4 \tweak style #'trill _\startTextSpan c4 c4 \stopTextSpan c4 ^\mordent | % 9

  \barNumberCheck #10
  c4 ^\prall c4 \bachschleifer c4 :32 c4 \haydnturn \break | % 10
  c4 ^\ornament "" "scripts.turn" "♮" c4 ^\ornament "♯" "scripts.turn"
  "accidentals.mirroredflat.flat" c4 -\tweak parent-alignment-X #CENTER -\tweak
  self-alignment-X #CENTER ^\markup \accs-ornament { \number "♯" \concat {
      \fontsize #3 "[" \number "𝄪" \fontsize #3 "]" } } \musicglyph
  "scripts.turn" { } c4 ^\accTrill "♯" \bar "||" % 11
  c4 \upbow c4 \downbow g'4 \flageolet g4 \flageolet \break | % 12
  a4 \flageolet <\harmonicSmall \parenthesize g,, c \harmonic>4 c4 \harmonic
  <\harmonicSmall \parenthesize c \harmonic g'' \flageolet>4 | % 13
  <\harmonicParen 0.4 0.8 \harmonicSmall g \harmonicSmall c \harmonic g'' \flageolet>4
  <a d \harmonic>4 <\harmonicParen 0.4 0.8 \harmonicSmall a \harmonicSmall d
    \harmonic a'' \flageolet>4 c'4 \open \break | % 14
  c4 \thumb c4 -1 <c -2 d -3 e -4 f -5>4 c4 ^\finger "012" _345 | % 15
  c4 -\substFinger "" "2" "3" c4 -\finger "2(3)" c4 -\RH "a" c4 _\RH \markup
  \concat { a \char ##x200A m \char ##x200A i } \break | % 16
  c4 c4 c4 -+ c4 \snappizzicato | % 17
  c4 c4 \5 c4 c4 \break | % 18
  c4 c4 c4 -\bendAfter #4 c4 -\bendAfter #3 | % 19

  \barNumberCheck #20
  c4 -\bendAfter #-0.5 c4 -\bendAfter #3.5 c4 c4 \break | % 20
  c4 \rheel c4 \rtoe c4 \rheeltoe c4 \bar "||" % 21
  R1 ^\fermata | % 22
  \break c4 -\f c4 -\sfp c2 -\sfffz | % 23
  g4 ^^ ^. g4 _> _- ^. r2 \bar "|."
}

PartPOneVoiceOneLyricsOne = \lyricmode {
  \set ignoreMelismata = ##t
  \set includeGraceNotes = ##t
  fermata fermata normal angled square arpeggio "non-" accidental accent strong
  staccato tenuto detached "stacca-" spiccato scoop plop doit falloff breath
  caesura stress "un-" soft trill turn delayed inverted delayed vertical
  inverted shake wa -- vy -- line mordent inverted schleifer tremolo haydn
  "turn + acc." "turn + acc." "turn + acc." "trill + acc." "up-" "down-"
  harmonic natural artificial natural natural natural "nat. harm." artificial
  "art. harm." open "thumb-" fingering fingering fingering fingering fingering
  pluck pluck double triple stopped "snap-" fret string hammer -- on pull -- off
  "bend 4" "bend 3" "bend -0.5" "bend 3.5" tap tap heel toe "heel-toe" "finger-"
  f sfp other "strong ↑" "acc. ↓"
}

PartPOneVoiceOneLyricsTwo = \lyricmode {
  \set ignoreMelismata = ##t
  \set includeGraceNotes = ##t
  upright inverted fermata fermata fermata \skip1 arpeggio "mark ↑" \skip1
  accent \skip1 \skip1 legato tissimo \skip1 \skip1 \skip1 \skip1 \skip1 mark
  \skip1 \skip1 stress accent mark \skip1 turn turn inverted turn vertical
  \skip1 \skip1 \skip1 \skip1 \skip1 mordent \skip1 \skip1 \skip1 "mark ↓"
  "marks ↑↓" "marks ↑[↑]" "mark ↑" bow bow \skip1 harmonic harmonic harmonic
  harmonic harmonic "(base+touch" harmonic "(base+touch" string position "1"
  "2,3,4,5" "0,1,2↑" "2, subst. 3" "2, alt. 3" a "a,m,i↓" tongue tongue \skip1
  "pizz." "0" "5" \skip1 \skip1 \skip1 \skip1 \skip1 "with bar" "pre-bend"
  release \skip1 T \skip1 \skip1 "subst." nails \skip1 \skip1 dynamics
  "stacc. ↑" "ten. ↓"
}

PartPOneVoiceOneLyricsThree = \lyricmode {
  \set ignoreMelismata = ##t
  \set includeGraceNotes = ##t
  \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1
  \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1
  \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 turn \skip1 turn \skip1 \skip1
  \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1
  \skip1 \skip1 \skip1 \skip1 \skip1 "(base+touch)" "(touch)" "(touch+sound)"
  "+sound)" "(base+touch)" "+sound)" \skip1 \skip1 \skip1 \skip1 "3,4,5↓" \skip1
  \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1
  \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1 \skip1
  \skip1 \skip1 \skip1 \skip1 \skip1 "stacc. ↑"
}


% 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
        }
        \new Lyrics \lyricsto "PartPOneVoiceOne" {
          \PartPOneVoiceOneLyricsTwo
        }
        \new Lyrics \lyricsto "PartPOneVoiceOne" {
          \PartPOneVoiceOneLyricsThree
        }
      >>
    >>
  >>
  \layout {}
  % To create MIDI output, uncomment the following line:
  % \midi { \tempo 4 = 100 }
}




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