[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Call for help with bar lines
From: |
address@hidden |
Subject: |
Re: Call for help with bar lines |
Date: |
Wed, 26 Sep 2012 12:34:05 +0200 |
On 26 sept. 2012, at 12:07, Marc Hohl <address@hidden> wrote:
> Am 26.09.2012 11:47, schrieb address@hidden:
>> On 26 sept. 2012, at 11:01, Marc Hohl <address@hidden> wrote:
>>
>>> Can anyone with more knowledge than me give me a hint what's wrong?
>>> IIUC correctly, lilypond draws a bar line at the beginning of each line,
>>> but in most cases, this is an invisible one.
>>> If you look at the results of input/regression/lyrics-spanbar.ly,
>>> the whole stuff is shifted that much to the right that lilypond moves
>>> the rightmost rest to a new line! I can't believe that a bar line with
>>> zero width can be the cause for this...
>>>
>>> Any hints are highly appreciated!
>>>
>>> Regards,
>>>
>>> Marc
>>>
>> Hey Marc,
>>
>> I unfortunately don't have much time to help you out, but I can tell you
>> that you are on the right track doing prints to the command line. I would
>> not, however, stash them in lambda functions used as overrides, as this can
>> sometimes interfere with pure properties.
> Thanks for the hint, but I assume that this is not the case here, where I
> wrap ly:bar-line::print into
> a callback ...
ly:bar-line::print is a registered pure-print-callback (line 2712 of
define-grobs.scm), so when you use a custom callback, LilyPond stops finding
pure heights of bar lines. To make sure that pure extents kick in, you'd need
to do something like
\override BarLine #'print = #my-print-callback
\override BarLine #'Y-extent = #(ly:unpure-pure-container
ly:grob::stencil-height (lambda (grob s e) (ly:grob::stencil-height grob)))
You can check on the CG subchapter on pure properties for more examples.
>>
>> There are a couple classic things I use, most of which are in grob.cc.
>>
>> In Grob::pure_relative_y_coordinate, before the last return statement, you
>> can put:
>>
>> if (name () == "BarLine") print ("RELATIVE COORDINATE for BARLINE at spanned
>> rank %d: %4.4f\n", spanned_rank_interval ()[LEFT], out);
> This can be quite handy, thanks!
>
> But back to my original question: can someone please have a quick glimpse at
> the regtests?
> Perhaps he can spot the cuprit very easily ...
I looked at them and my guess is that the pure extents (and maybe even unpure
extents) are being changed, which is why I suggested doing prints to the
command line for extents (both X and Y).
Cheers,
MS
- Call for help with bar lines, Marc Hohl, 2012/09/26
- Re: Call for help with bar lines,
address@hidden <=
- Re: Call for help with bar lines, Phil Holmes, 2012/09/26
- Re: Call for help with bar lines, address@hidden, 2012/09/26
- Re: Call for help with bar lines, Marc Hohl, 2012/09/26
- Re: Call for help with bar lines, Marc Hohl, 2012/09/26
Re: Call for help with bar lines, Thomas Morley, 2012/09/26