Hi Kyle,
> Here's a (slightly more concise) MWE that works with everything... except for
> if the MMRest starts on the first bar. Any help with that or feedback would
> be greatly appreciated. Thank you again for everyone's help so far.
This is impressive!
That being said, if my 20+ years with Lilypond has taught me anything, it’s
that this kind of solution likely isn’t necessary. I am 99% certain there’s a
very simple incantation (maybe involving rods-and-springs or some other spacing
parameter?) that will solve the problem with far less code. Consider how
dynamics already Do The Right Thing™ w.r.t. vertical “slipping”:
%%% EXAMPLE BEGINS
\version "2.25.1"
\language "english"
\paper { indent = 0 }
\new PianoStaff \with {
\override StaffGrouper.staff-staff-spacing.padding = #0.2
\override DynamicLineSpanner.staff-padding = #1.5
} <<
\new Staff \relative c'' {
\key c\minor \tempo"Tempo I" \stemUp
<g d bf g>4\fp ~ <g d bf g>16. <g d>32-3 <a fs d>16.-4 <bf d,>32-5 <bf-5 g
e>4( <a-4 fs>8) r | \noBreak
<c-3 a fs>4\fp~<c a fs>16. <c a fs>32-4 <d a fs>16.-5 <ef a, fs>32-4 <ef-5
a, fs>4( <d-5 bf g>8) r -\tweak color blue -\tweak Y-offset #-3.2 \p | \noBreak
<c^5 a^3 fs^2>4\fp~<c a fs>16. <c a fs>32-3 <d a fs>16.-4 <ds a fs>32-5 <ds
a fs>4-4^(\p <e g, e> | \noBreak
<a,^5 fs^3 ds^2>\cresc
\override Fingering.text = "4-5"
<g e b>-4 <fs ds c a>-4\!
\revert Fingering.text
<ds-4 a fs>)\fermata \pp |
}
\new Staff \relative c {
\clef bass\key c\minor
\override Fingering.staff-padding = ##f
<g d bf g>4~ <g d bf g>16. bf'32_2 a16. g32_5 cs4( d8) r16. ef,32 |
ef'4~ ef16. ef32-2 d16.-1 c32 bf4. r16. ef,32 |
ef'4 ~ ef16. ef32-2 d16.-1 c32-3 c8-2( b4-3) b8-1~ |
b b,4_5 b_1 b,-5 b8-4_\fermata
\bar"||"
}
>>
%%% EXAMPLE ENDS
I’m hoping to hear from Jean or David or someone with a deeper understanding of
Lilypond than I have.
Best,
Kieren.
__________________________________________________
My work day may look different than your work day. Please do not feel obligated
to read or respond to this email outside of your normal working hours.