lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue 1268 in lilypond: [PATCH] span-bar problem


From: Benkő Pál
Subject: Re: Issue 1268 in lilypond: [PATCH] span-bar problem
Date: Sun, 2 Jan 2011 12:33:35 +0100

hi Joe,

>>> Comment #9 on issue 1268 by joeneeman: [PATCH] span-bar problem
>>> http://code.google.com/p/lilypond/issues/detail?id=1268
>>>
>>> I've tracked the problem down to Bar_line::compound_barline,
>>> which tries to
>>> center the bar line around the center of the staff
>>> (see lines 119 and below).

>> thanks for the hint.
>> do you think my patch is a good start?

> Yes, but you need to be careful about what happens when bar-size is set.
> Currently, your patch will break (for example) input/regression/drums.ly
> because it ignores bar-size.

well, I think extent shouldn't be computed from size
as it loses information, but the other way round.

AFAICS the intent of the span bar code is to draw lines
not between staves but from line to line, and my patch
reverts this.
of course there's no difference in general, but there is
if bar lines are to have different extent than that of
their staff; and there is a further difference whether
the bar is shorter or longer than the staff: if longer,
there may be no point in using span bars at all; if
shorter, then perhaps span bars are better placed just
between staves (see spantest5.ly).

I still don't know exactly how should spantest3 behave
(spantest5 makes me feel it works acceptably), neither
what should happen if different bar types are connected
(see spantest4.ly - I hope this is farthest from a real
world case of all my tests).

>>> I removed the center setting code and that
>>> (with my patch still active) made my example perfect;
>>> however, the attached complementary test (with bar
>>> lines only within staff, not between them) failed,
>>> but it's perfect with current center setting
>>> (independently whether my original patch is active or not).

>> Since Bar_line::compound_barline is used in both BarLine and SpanBar, you
>> will need to find some solution that works for both cases. It won't be as
>> simple as just enabling or disabling the centering code.

I moved the centering code from compound_barline to print,
and this way all regtests are OK and all my spantests are
good or at least acceptable.

standalone patch attached.
p

Attachment: patch18
Description: Binary data

Attachment: spantest4.ly
Description: Binary data

Attachment: spantest5.ly
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]