Re: Chord names collide with span bar

Aaron Hill via bug-lilypond <[email protected]>
Newsgroups gmane.comp.gnu.lilypond.bugs
Message-ID <[email protected]>
On 2024-03-19 2:29 pm, Knute Snortum wrote:
> I ran into something today -- it's not quite a bug; more of an "ugly."  
> In
> some situations, chord names collide with the span bar of a Grand or 
> Piano
> Staff.  Here is an example:
> 
> \version "2.25.13"
> 
> \score {
>   \new GrandStaff <<
>     \new Staff \relative { c''4 c c c | c c c c }
>     \new ChordNames \chordmode { c2. q8. des16:maj9 | q1 }
>     \new Staff { \improvisationOn b'4 4 4 8. 16~ | 4 4 4 4 }
>   >>
> }


Curious.  The skylines look interesting, almost like the SpanBar is not 
being factored in, only the parts of the BarLine.

Below, I attempted to add some virtual height to the ChordName, and it 
seemed to allow the ChordName to push the BarLine (and SpanBar) to the 
right:

%%%%
\version "2.22.0"

#(ly:set-option 'debug-skylines #t)
\layout {
   \context { \Score
     \override NonMusicalPaperColumn.stencil =
       #ly:separation-item::print
   }
   \context { \ChordNames
     \override ChordName.extra-spacing-height =
       #'(0 . 2)
   }
}

\score {
   \new GrandStaff <<
     \new Staff \relative { c''4 c c c | c c c c }
     \new ChordNames \chordmode { c2. q8. des16:maj9 | q1 }
     \new Staff { \improvisationOn b'4 4 4 8. 16~ | 4 4 4 4 }
   >>
}
%%%%

Still sounds like a defect of some sort, as the default behavior should 
probably be handling things.  But perhaps this trick above might be 
useful in whatever score you are working on as a stopgap.


-- Aaron Hill
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.