On Mon, Aug 31, 2015 at 7:58 AM, David Nalesnik <[email protected]>
wrote:

> Victor,
>
> On Sun, Aug 30, 2015 at 8:12 PM, Víctor <[email protected]> wrote:
>
>> Dear David and lilyponders:
>>
>>     I'm glad to see that you are around here again, so now I hope it will
>> be not much of a trouble if ask you to take a look to the aforementioned
>> problem with the ties and centered notes. For those who don't know what I'm
>> talking about, David Nalesnik programed a very useful function that centers
>> notes when they occupy the whole measure. The problem seems to be that
>> tie's length is not recalculated after the note column has been moved; and
>> since my scheme-fu is very basic, I just can't fix this myself.
>>
>>
> I'm sorry, but I don't know how to fix this.
>
> The problem lies in the code for determining whether the PaperColumn to
> center or ignore is alone in the measure.  This requires access to other
> columns in the line, and these are located through the grob-array
> 'columns.  Unfortunately, this array is empty until line breaking has
> occurred.  By then, it's too late to do anything about the ties, as far as
> I know.  If there were a way to get the previous and adjoining columns
> before line breaking, that could possibly fix your problem.  I don't see a
> way in Scheme, but I'd welcome being wrong about that.
>
>
And you might think 'left-neighbor and 'right-neighbor (
http://lilypond.org/doc/v2.19/Documentation/internals/spaceable_002dgrob_002dinterface)
would be exactly what we want.  Works for an override of
PaperColumn.after-line-breaking but we come up empty for
'before-line-breaking:

\version "2.19.25"

{
  \override Score.PaperColumn.before-line-breaking =
  #(lambda (grob)
     (let ((left (ly:grob-object grob 'left-neighbor))
           (right (ly:grob-object grob 'right-neighbor)))
       (format #t "left neighbor: ~a right neighbor: ~a~%" left right)))

  c'1
  c'1
}

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

Reply via email to