Hi Kyle,

Okay, I see the issue(s) now…

Attached, below, is a modified MWE (more M than yours, with some optimizations).

I know there’s a way to tell the two custom contexts to ignore the skylines set 
by the notes — and thus float to the true centre, as you want — but I haven’t 
yet found the magic incantation. Hopefully someone else (Valentin? Lukas? one 
of the Davids?) will be able to provide the answer quickly, but I’ll keep on 
the hunt just in case.

Cheers,
Kieren.

p.s. Ultimately, you probably only want one context, combining the MMRs and 
dynamics, since one would assume they appear in mutually exclusive measures…? I 
left it as two separate contexts for now.
________________________________________________

%%%  SNIPPET BEGINS
#(ly:set-option 'debug-skylines #t)

\layout {
  
  \context {
    \Staff
    \name customStaffDown
    \alias Staff
    \inherit-acceptability customStaffDown Staff
    \omit MultiMeasureRestNumber
    \override MultiMeasureRest.expand-limit = #1
  }
  
  \context {
    \Staff
    \name customStaffUp
    \alias Staff
    \inherit-acceptability customStaffUp Staff
    \accidentalStyle piano
    \omit MultiMeasureRestNumber
    \override MultiMeasureRest.expand-limit = #1
  }

  \context {
    \name PianoMMR
    \type "Engraver_group"
    \inherit-acceptability PianoMMR Dynamics
    \consists "Axis_group_engraver"
    \override VerticalAxisGroup.staff-affinity = #CENTER
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
      #'((basic-distance . 2) (minimum-distance . 1) (padding . 0.5) 
(stretchability . 1))
    \consists "Multi_measure_rest_engraver"
    \hide MultiMeasureRest
  }

  \context {
    \Dynamics
    \name customStaffDynamics
    \alias Dynamics
    \inherit-acceptability customStaffDynamics Dynamics
    \override VerticalAxisGroup.staff-affinity = #CENTER
    \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
      #'((basic-distance . 2) (minimum-distance . 1) (padding . 0.5) 
(stretchability . 1))
  }

  \context {
    \StaffGroup
    \name customStaffGroup
    \alias StaffGroup
    \inherit-acceptability customStaffGroup StaffGroup
    systemStartDelimiterHierarchy = #'(SystemStartBrace a b)
  }

}

pianoLayout = \layout {
  #(layout-set-staff-size 18.5)
}

% Begin Score Output
\score {
  \new customStaffGroup <<
    \new customStaffUp = "up" \relative c'' {
      \clef treble \key a \major \time 6/8
      \repeat unfold 2 { r8 r8 <e e'> r8 r8 <e e'> | }
      R2.*2 |
      \repeat unfold 2 { r8 r8 <e e'> r8 r8 <e e'> | }
      \break
      \repeat unfold 2 { r8 r8 <e e'> r8 r8 <e e'> | }
      R2.*2 |
      \repeat unfold 2 { r8 r8 <e e'> r8 r8 <e e'> | }
    }
    \new PianoMMR {
      \repeat unfold 2 {
        s2.*2 | \compressMMRests { R2.*2 } | s8 s8 s8\ff s4. | s2.
      }
    }
    \new customStaffDynamics {
      \repeat unfold 2 {
        s2.*2 | s2.*2 | s8 s8 s8\ff s4. | s2.
      }
    }
    \new customStaffDown = "down" \relative c {
      \clef bass \key a \major \time 6/8
      \repeat unfold 2 {
        r8 r8 <e e'> r8 r8 <e e'> |
      }
      R2.*2 |
      \repeat unfold 2 {
        r8 r8 <e e'> r8 r8 <e e'> |
      }
      \break
      \repeat unfold 2 {
        r8 r8 <e e'> r8 r8 <e e'> |
      }
      R2.*2 |
      \repeat unfold 2 {
        r8 r8 e r8 r8 e |
      }
    }
  >>

  \layout {
    \pianoLayout
  }
}

\version “2.24.4"
%%%  SNIPPET ENDS
__________________________________________________

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.


Reply via email to