Hi Kieren,

Thanks for your answer and time. It looks really nice!

However, it seems that both solutions run along similar lines: redefining
contexts. In your solution you split the topmost layout objects  from the
staff context in two different contexts and create another -the bottom
one-. In my solution, I redefine the staff context to address separately
the one located at the top, the one(s) in the middle, and the bottom one.

It is clear also that to achieve a simpler solution Lilypond would need the
ability (perhaps it already has the feature; I don't know) to identify if a
particular staff is at the top, the bottom or "in the middle" of a
particular group context (Staff group in this case, but also Score, Piano
staff, ChoirStaff, whatever) and be able to modify it's properties in an
individual way.

All the best!

F.

El sáb, 1 jun. 2024 08:33, Kieren MacMillan <kie...@kierenmacmillan.info>
escribió:

> Hi Federico,
>
> I’ve adjusted my snippet a little, and I think it might handle all your
> spacing issues…? Let me know!
>
> Best,
> Kieren.
>
> %%%  SNIPPET BEGINS
> \version "2.25.15"
>
> \paper {
>   system-system-spacing.padding = 4
> }
>
> \layout {
>   \context {
>     \type "Engraver_group"
>     \name TS
>     keepAliveInterfaces = #'( time-signature-interface )
>     \consists "Time_signature_engraver"
>     \override TimeSignature.font-size = #-1
>     \override TimeSignature.extra-offset = #'(-1.75 . 1.25)
>     \consists "Axis_group_engraver"
>     \override VerticalAxisGroup.staff-affinity = #UP
>     \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
>       #'((basic-distance . 3) (minimum-distance . 2) (padding . 1))
>   }
>   \context {
>     \type "Engraver_group"
>     \name ScoreMarks
>     keepAliveInterfaces = #'( metronome-mark-interface
> time-signature-interface )
>     rehearsalMarkFormatter = #format-mark-box-alphabet
>     \consists "Axis_group_engraver"
>     \override VerticalAxisGroup.staff-affinity = #DOWN
>     \override VerticalAxisGroup.nonstaff-relatedstaff-spacing =
>       #'((basic-distance . 3) (minimum-distance . 2) (padding . 1))
>     \consists "Metronome_mark_engraver"
>     \override MetronomeMark.Y-offset = #0
>     \override MetronomeMark.X-offset = #2
>     \override MetronomeMark.outside-staff-priority = #50
>     \override MetronomeMark.break-align-symbols =
>       #'(left-edge staff-bar clef time-signature key-signature)
>     \override MetronomeMark.non-break-align-symbols =
>       #'(paper-column-interface)
>     \override MetronomeMark.extra-spacing-width = #'(0.5 . 0.5)
>     \consists "Mark_engraver"
>     \override RehearsalMark.Y-offset = #0
>     \override RehearsalMark.outside-staff-priority = #100
>     \override RehearsalMark.break-align-symbols =
>       #'(left-edge staff-bar clef time-signature key-signature)
>     \override RehearsalMark.self-alignment-X = #CENTER
>     \override RehearsalMark.extra-spacing-width = #'(0.5 . 0.5)
>     \consists "Text_spanner_engraver"
>     \override TextSpanner.font-size = #2
>     \consists "Time_signature_engraver"
>     \override TimeSignature.font-size = #-1
>     \override TimeSignature.X-extent = #empty-interval
>     \override TimeSignature.X-offset = #-1.75
>     \override TimeSignature.extra-offset = #'(0 . 1.5)
>   }
>   \context {
>     \Score
>     \remove "Bar_number_engraver"
>     \remove "Metronome_mark_engraver"
>     \remove "Mark_engraver"
>     \accepts ScoreMarks
>     \accepts TS
>   }
> }
>
> tsIn = {
>   \undo \omit Staff.TimeSignature
>   \omit ScoreMarks.TimeSignature
>   \omit TS.TimeSignature
> }
> tsOut = {
>   \omit Staff.TimeSignature
>   \undo \omit ScoreMarks.TimeSignature
>   \undo \omit TS.TimeSignature
> }
>
> global = {
>   \once \omit ScoreMarks.TimeSignature
>   \once \omit TS.TimeSignature
>   \time 4/4 s1
>   \tsOut \tempo "Allegro" \time 3/4 s2.
>   \tsIn \time 6/8 \tempo "Adagio" s2.
>   \tsOut \time 2/4 \tempo "Allegretto" s2
>   \tsIn \time 2/2 s1
>   \tsOut \time 6/4 s1.
>   \tsIn \time 4/4 s1
>   \time 3/4 s2.
> }
>
> someNotes = \repeat unfold 58 { c'8 }
>
> \score {
>   <<
>     \new ScoreMarks \global
>     \new StaffGroup <<
>       \new Staff = "one" \new Voice { << \global \someNotes >> }
>       \new Staff = "two" \new Voice { << \global \someNotes >> }
>       \new Staff = "thr" \new Voice { << \global \someNotes >> }
>     >>
>     \new TS \global
>   >>
> }
> %%%  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