Hi,

I'm confused about the handling of accidentals in tied notes/chords.

ly:note-column-accidentals returns either an AccidentalPlacement object
or an empty list. I found out that the AccidentalPlacement's X-extent
interacts in a somehow strange way with the NoteColumn's X-offset, but
that's (probably) not the issue here.

What I'm wondering here is: in a tied note/chord there is an
AccidentalPlacement object with an X-extent, even if the accidentals are
not displayed:

\version "2.19.57"

{
  \override TieColumn.after-line-breaking = 
  #(lambda (tc)
     (let* ((rb (ly:grob-parent (ly:spanner-bound tc RIGHT) Y))
            (accs (ly:note-column-accidentals rb))
            (accs-extent 
             (if (null? accs)
                 "No AccidentalPlacement object."
                 (ly:grob-property accs 'X-extent))))
       (display accs-extent)))
  
  % No accidentals in chord: No AccidentalPlacement object
  %<c' f' g' b'>1 ~ q
  % Accidentals in chord: AccidentalPlacement object on the right column
  % even if it is not shown.
  <c' fis' gis' bis'>1 ~ q
}

% displays (-4.05 . -0.35)

In order to determine the spacing to the left of a tied note column I
thought I could rely on the presence or absence of the
AccidentalPlacement, but obviously this isn't the case. So could someone
give an explanation (or at least a suggestion) why this
AccidentalPlacement is there and - more importantly - how I can reliably
determine the presence or absence of the visual accidentals (at the time
of stencil override)? TIA Urs

-- 
[email protected]
https://openlilylib.org
http://lilypondblog.org
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to