Re: Dynamics collide with span bar (was Re: Chord names collide with span bar)

2024-03-22 Thread Michael Bret
Many thanks, Aaron. So here is a cleaner MWE, with your fix:


\version "2.25.13"
#(ly:set-option 'debug-skylines #t)
\layout {
 \context { \Score
  \override NonMusicalPaperColumn.show-horizontal-skylines = ##t
 }
}

\layout {
 \context { \Dynamics
   \consists Pure_from_neighbor_engraver
   \remove Bar_engraver
 }
}

\score {
 \new GrandStaff <<
   \new Staff \relative { e''4 4 4 4 | 4 4 4 4 }
   \new Dynamics { s1 | s1 \ppp  }
   \new Staff \relative { d''4 4 4 4 | 4 4 4 4 }
 >>
}



Then, it should be added that transposing your first fix (namely, 
BarLine.bar-extent = #'(0 . 1) and transparent = ##t) DOES solve the issue WITH 
“Bar_engraver” consisted. How does that make sense? I probably don’t get what 
"Span_bar_stub_engraver getting tripped up by the Bar_engraver” entails. It 
might be useful to keep it in mind, in order to identify cases where the fix 
messes up something.
Same MWE as above, with this instead:

\layout {
 \context { \Dynamics
   \consists "Bar_engraver"
   \override BarLine.bar-extent = #'(0 . 1)
   \override BarLine.transparent = ##t
 }
}




Re: Dynamics collide with span bar (was Re: Chord names collide with span bar)

2024-03-22 Thread Aaron Hill

On 2024-03-22 4:08 pm, Michael Bret wrote:

Dear Werner, Aaron and Knute,
(it is y first time attempting to contribute to such lilypond 
discussion so I don’t dare cc-ing the whole mailing list)



(Adding the mailing list for visibility...)

Regardless of your experience or comfort level, it is always recommended 
to include the mailing list in all discussions unless something must be 
privately communicated.  The reason is simple: All of us are volunteers, 
in one form or another.  Our time and availability are subject to change 
on a whim.  Directly emailing individuals greatly limits your chances of 
getting a prompt response (or any response at all), whereas writing to 
the broader audience increases the likelihood of a reply from someone 
who has the time to get back to sooner.  It is also very helpful to have 
email archives that are complete.  Off-list messages can disrupt proper 
threading of emails.



Is this issue related to this one (collision between dynamic text and 
span bar)?

https://music.stackexchange.com/questions/116312/lilypond-auto-horizontal-space-for-dynamic-text

Root cause seems similar since it is about the skyline of span-bar not 
being extended.


However, the solution provided by Werner doesn’t seem to transpose 
effectively. I tried this to no avail:



This would appear to be related, although a new wrinkle has appeared.

Something to note is that the Dynamics context already consists the 
Bar_engraver in order to make use of the to-barline property.  In my 
testing, I found that having the Bar_engraver consisted is getting in 
the way.  If you remove Bar_engraver and consist 
Pure_from_neighbor_engraver within Dynamics, it behaves similar to the 
ChordNames fix.  So, it would seem the Span_bar_stub_engraver is perhaps 
getting tripped up by the Bar_engraver.



\version "2.25.13"
\language "italiano"

common = {
  \key sol \minor
  \time 4/4
  \tempo "Largo [Широко]"
}

right = \relative do'' {
  \key sol \major
  sol8 (fad re mi sol fad re4) |
  sol8 (fad re mib sol fad re4)
}

left = \relative do' {
  \key sol \major
  sol,8 (re' si' re,) sol, (re' do' re,) |
  sol, (re' sib' re,) sol, (re' do' re,) |
}

dynamics = {
  s1 |
  \override DynamicText.extra-spacing-width = #'(-1 . 1)
  s8 \ppp s8 s8 s8 s8 s8 s4
}

%% #(ly:set-option 'debug-skylines #t)
\layout {
  \context { \Dynamics
\consists Pure_from_neighbor_engraver
\remove Bar_engraver
  }
}

\score {
  \new PianoStaff <<
\new Staff = "right" \right
\new Dynamics \dynamics
\new Staff = "left" { \clef bass \left }
  >>
}



-- Aaron Hill