From: Paolo Prete <[email protected]>
Date: Saturday, January 11, 2020 at 5:22 PM
To: Carl Sorensen <[email protected]>
Cc: lilypond-user <[email protected]>
Subject: Re: Sustain pedal problems with voices/staffs (re-posted)

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.19.83"
upper = {
  s1
}

lower = {
 c'8[\sustainOn  \change Staff = "upper" d'' e'' f'']\sustainOff r2
}

\score {
  \new PianoStaff <<
    \new Staff = "upper" \upper
    \new Staff = "lower" \lower
  >>
  \layout { }
  \midi { }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\version "2.19.83"
upper = {
  s1
}

lower = {
c'8[\sustainOn  \change Staff = "upper" d'' e'' f'']\sustainOff r2
}

\score {
  \new PianoStaff \with {
    \consists Piano_pedal_engraver
    \consists Piano_pedal_align_engraver
    \consists Piano_pedal_performer
  }
                          <<
    \new Staff = "upper" \with {
      \remove Piano_pedal_engraver
      \remove Piano_pedal_performer
      \remove Piano_pedal_align_engraver
    }  \upper
    \new Staff = "lower"  \with {
      \remove Piano_pedal_engraver
      \remove Piano_pedal_performer
      \remove Piano_pedal_align_engraver
    } \lower
  >>
  \layout { }
  \midi { }
}

OR

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\version "2.19.83"
\include "LilyJSSVG.ly"
\addJSSVGTuner "html"

upper = {
 c'8 c' c' c' \change Staff = "lower" c'8[\sustainOn  \change Staff = "upper" 
d'' e'' f'']\sustainOff
}

lower = {
s1
}

\score {
  \new PianoStaff <<
    \new Staff = "upper" \upper
    \new Staff = "lower" \lower
  >>
  \layout { }
  \midi { }
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

How can your solution can be applied to the above examples?
IIUC the way to avoid these things is using the Dynamics layer.
Another way is to use a function that moves all the pedal items to the lower 
staff, which is not a limitation. I implemented it, meanwhile, in my 
EasyCrossStaff template. Ugly Scheme code (sorry: I'm not a Scheme programmer 
and hope someone could clean the code) but it seems to work well (I've used it 
a lot)

http://lilybin.com/ilsup7/1

best,
P

Reply via email to