%% 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/43d-MultiStaff-StaffChange.xml"
\sourcefileline 0
\version "2.26.0"
% automatically converted by musicxml2ly from -
\pointAndClickOff

%% additional definitions required by the score:
D = \tweak Stem.direction #DOWN \etc
U = \tweak Stem.direction #UP \etc


\header {
  texidoc = "Staff changes in a piano staff. In the first measure, the voice
    from the second staff has some notes on the first staff.

    In the second measure, the voice from the second staff holds four chords.
    All notes of the first one are in the second staff, and all notes of the
    second one are in the first staff. The remaining two demonstrate cross-staff
    chords: The top note of the third chord is in the first staff (with the
    other notes in the second staff), and the bottom note of the fourth chord is
    in the second staff (with the other notes in the first staff).

    In both bars, no explicit stem directions are set; it is thus up to the
    application to decide whether the beams appear below the second staff or
    between the two staves."
}
\layout {
  \context {
    \Staff
    printKeyCancellation = ##f
  }
  \context {
    \PianoStaff
    \consists "Span_stem_engraver"
  }
  \context {
    \Score
    autoBeaming = ##f
  }
}
PartPOneVoiceOne = \relative c' {
  \clef "treble" \time 4/4 \key c \major s1 | % 1
  \oneVoice R1 \bar "|."
}

PartPOneVoiceOneD = \crossStaff \relative c' {
  \clef "treble" \time 4/4 \key c \major s4*5 c8 <c e g>8 s2 \bar "|."
}

PartPOneVoiceTwo = \relative a {
  \clef "treble" \time 4/4 \key c \major a8 [ \change Staff="1" e'8 \change
  Staff="2" a,8 \change Staff="1" e'8 ] c'8 [ e,8 \change Staff="2" a,8 \change
  Staff="1" b'8 ] \change Staff="2" | % 1
  \clef "bass" <c,, e g c>8 [ \change Staff="1" <c' e g>8 \change Staff="2" \D
  <c, e g>8 \D g'8 ] r2 \bar "|."
}


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




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