On Nov 28, 2011, at 10:05 AM, k-ohara5a5a@oco.net wrote: > Hairpins already get padding at ...
13 years, 5 months ago
(2011-11-28 09:11:47 UTC)
#5
On Nov 28, 2011, at 10:05 AM, k-ohara5a5a@oco.net wrote:
> Hairpins already get padding at the span bars, so rather than add a
> second implementation can't we just repair the existing implementation ?
>
> Maybe <http://codereview.appspot.com/5373048/> will do. (I'm just
> starting a make check.)
>
Ah, I didn't know that this already existed.
I think the regtest I added w/ my patch covers all the bases (see below for the
code & see attached for the result). If the hairpins stop before span bars but
extend all the way when span bar's don't exist (including when they are not
present because of the RemoveEmptyStaffContext), then I'd much rather go with
your patch, as it is much less invasive than mine.
Lemme know!
Cheers,
MS
On 2011/11/28 09:11:47, mike_apollinemike.com wrote: > If the hairpins stop before span bars but > ...
13 years, 5 months ago
(2011-11-29 02:13:25 UTC)
#7
On 2011/11/28 09:11:47, mike_apollinemike.com wrote:
> If the hairpins stop before span bars but
> extend all the way when span bar's don't exist
> (including when they are not
> present because of the RemoveEmptyStaffContext),
> then I'd much rather go with
> your patch, as it is much less invasive than mine.
>
> Lemme know!
>
From the response on the tracker issue, it seems that people don't want the
complicated behavior you just described, so we can go with the simpler
<http://codereview.appspot.com/5373048/> ; it made a clean check. I linked it
to issue 2060 but it fixes 2057 as well.
On Nov 29, 2011, at 3:13 AM, k-ohara5a5a@oco.net wrote: > On 2011/11/28 09:11:47, mike_apollinemike.com wrote: ...
13 years, 5 months ago
(2011-11-29 06:58:20 UTC)
#8
On Nov 29, 2011, at 3:13 AM, k-ohara5a5a@oco.net wrote:
> On 2011/11/28 09:11:47, mike_apollinemike.com wrote:
>> If the hairpins stop before span bars but
>> extend all the way when span bar's don't exist
>> (including when they are not
>> present because of the RemoveEmptyStaffContext),
>> then I'd much rather go with
>> your patch, as it is much less invasive than mine.
>
>> Lemme know!
>
> From the response on the tracker issue, it seems that people don't want
> the complicated behavior you just described, so we can go with the
> simpler <http://codereview.appspot.com/5373048/> ; it made a clean
> check. I linked it to issue 2060 but it fixes 2057 as well.
>
> http://codereview.appspot.com/5438060/
Hey all,
I've attached the regtest I added compiled w/ Keith's patch & with my patch.
In the pdf compiled with version of my patch from last night, all of the
hairpins line up and stop short of the span bar. Alternatively, when there are
no span bar intersection problems, the hairpins go to the end of the line.
Keith - the pdf compiled with your patch seems to still have the intersection
problem. In general, it is very difficult to anticipate if a hairpin will bump
into a span bar without going through some code acrobatics, and even more
difficult to apply this change to all hairpins ending at the same
NonMusicalPaperColumn without a code 3-ring-circus. So, even though my code is
sprawley, I think that it is the only way to ensure the correct
collision-avoidance behavior.
Cheers,
MS
On Mon, 28 Nov 2011 22:58:07 -0800, mike@apollinemike.com <mike@apollinemike.com> wrote: > I've attached the regtest ...
13 years, 5 months ago
(2011-11-29 07:25:10 UTC)
#9
On Mon, 28 Nov 2011 22:58:07 -0800, mike@apollinemike.com
<mike@apollinemike.com> wrote:
> I've attached the regtest I added compiled w/ Keith's patch & with my patch.
Your test case has one very long hairpin in each staff, spanning three systems.
Do we want to insert a gap in the broken hairpin to make room for the span bar
at the end of the line? We don't create a gap for span bars in the middle of a
line, so I didn't think that is what the bug report asked for.
I split off issue 2060, which simply makes hairpins at the end-of-line act just
as they do at any other bar line. I will want to be able to do that regardless
of what you do with your patch. I also want to fix the original code so that it
works consistently, otherwise your hairpin-shortening code will need to be
synchronized to the bug in the original implementation to avoid
double-shortening.
On Nov 29, 2011, at 8:25 AM, Keith OHara wrote: > On Mon, 28 Nov ...
13 years, 5 months ago
(2011-11-29 07:38:35 UTC)
#10
On Nov 29, 2011, at 8:25 AM, Keith OHara wrote:
> On Mon, 28 Nov 2011 22:58:07 -0800, mike@apollinemike.com
<mike@apollinemike.com> wrote:
>
>> I've attached the regtest I added compiled w/ Keith's patch & with my patch.
>
> Your test case has one very long hairpin in each staff, spanning three
systems.
> Do we want to insert a gap in the broken hairpin to make room for the span bar
at the end of the line? We don't create a gap for span bars in the middle of a
line, so I didn't think that is what the bug report asked for.
>
> I split off issue 2060, which simply makes hairpins at the end-of-line act
just as they do at any other bar line. I will want to be able to do that
regardless of what you do with your patch. I also want to fix the original code
so that it works consistently, otherwise your hairpin-shortening code will need
to be synchronized to the bug in the original implementation to avoid
double-shortening.
>
Ah, ok, no harm no foul!
In the original report, my eyes zoomed directly to the second system, last
measure (which my patch fixes). I see what you mean that these two work
independently.
Could you post some PDFs of the patch in action? Just reading the code, with
respect to:
if (bound->is_non_musical (bound) || bound->break_status_dir())
I have trouble imagining how the second condition could add grobs that the first
doesn't cover (I thought that grobs with a break status dir were a strict subset
of non-musical grobs given how the property defs work in define-grobs.scm).
Cheers,
MS
On Mon, 28 Nov 2011 23:38:28 -0800, mike@apollinemike.com <mike@apollinemike.com> wrote: > Could you post some ...
13 years, 5 months ago
(2011-11-29 08:03:23 UTC)
#11
On Mon, 28 Nov 2011 23:38:28 -0800, mike@apollinemike.com
<mike@apollinemike.com> wrote:
> Could you post some PDFs of the patch in action?
There's an example at <http://code.google.com/p/lilypond/issues/detail?id=2060>
> Just reading the code, with respect to:
> if (bound->is_non_musical (bound) || bound->break_status_dir())
>
> I have trouble imagining how the second condition could add grobs that the
first doesn't cover (I thought that grobs with a break status dir were a strict
subset of non-musical grobs given how the property defs work in
define-grobs.scm).
The function Item:is_non_musical() returns false for copies of the original
Item. The barline at the end of the line always returns false, and I
tentatively concluded that was because it was a copy when the original barline
was split into three. I started looking for the reason for the strange behavior
of is_non_musical(), and concluded that the current behavior of is_non_musical()
is too deeply embedded to change.
On 2011/12/05 06:53:18, MikeSol wrote: > The issue is that if I did this, an ...
13 years, 4 months ago
(2011-12-05 07:58:08 UTC)
#21
On 2011/12/05 06:53:18, MikeSol wrote:
> The issue is that if I did this, an arriving hairpin would be in its own
> "concurrent-hairpins" grob array.
I thought that was the idea, because that is the array of all hairpins that are
checked for span-bar closeness.
Somehow the current hairpin has to notice if he is up against a span bar.
http://codereview.appspot.com/5438060/diff/14024/lily/hairpin.cc
File lily/hairpin.cc (right):
http://codereview.appspot.com/5438060/diff/14024/lily/hairpin.cc#newcode246
lily/hairpin.cc:246: Real broken_bound_padding = 0.0;
= me->"broken-bound-padding"
Mike, The old code was making a distinction between hairpins that end at the end ...
13 years, 4 months ago
(2011-12-08 00:30:20 UTC)
#22
Mike,
The old code was making a distinction between hairpins that end at the end of a
line and those that continue on the next line.
Sadly, the meaning of the boolean 'broken[]' stores at first whether the bound
on either end of a hair pin is at a line break, and then broken[RIGHT] is
changed so that it stores whether the hairpin itself was broken into pieces on
the right hand side.
Does your code preserve this distinction?
http://codereview.appspot.com/5438060/diff/2027/lily/hairpin.cc
File lily/hairpin.cc (right):
http://codereview.appspot.com/5438060/diff/2027/lily/hairpin.cc#newcode138
lily/hairpin.cc:138: if (broken[RIGHT])
The former code determining which hairpins were broken on the right, in the
sense of broken in the middle of the hairpin {c2\< c \break c c\f}, is still
around, and it is difficult to tell whether it still does anything.
http://codereview.appspot.com/5438060/diff/2027/scm/define-grob-properties.scm
File scm/define-grob-properties.scm (right):
http://codereview.appspot.com/5438060/diff/2027/scm/define-grob-properties.sc...
scm/define-grob-properties.scm:1049: be drawn above and below the staff. If no
span bar is in a position,
be drawn below and above the staff, respectively.
Le Dec 8, 2011 à 1:30 AM, k-ohara5a5a@oco.net a écrit : > Mike, > The ...
13 years, 4 months ago
(2011-12-08 08:18:05 UTC)
#23
Le Dec 8, 2011 à 1:30 AM, k-ohara5a5a@oco.net a écrit :
> Mike,
> The old code was making a distinction between hairpins that end at the
> end of a line and those that continue on the next line.
> Sadly, the meaning of the boolean 'broken[]' stores at first whether
> the bound on either end of a hair pin is at a line break, and then
> broken[RIGHT] is changed so that it stores whether the hairpin itself
> was broken into pieces on the right hand side.
> Does your code preserve this distinction?
>
>
Yes. I care about the latter (whether the hairpin itself is broken) and all my
code kicks in after this distinction is made.
> http://codereview.appspot.com/5438060/diff/2027/lily/hairpin.cc
> File lily/hairpin.cc (right):
>
> http://codereview.appspot.com/5438060/diff/2027/lily/hairpin.cc#newcode138
> lily/hairpin.cc:138: if (broken[RIGHT])
> The former code determining which hairpins were broken on the right, in
> the sense of broken in the middle of the hairpin {c2\< c \break c c\f},
> is still around, and it is difficult to tell whether it still does
> anything.
>
I'm not sure...in a separate patch, we can try removing it and see if that
results in anything.
> http://codereview.appspot.com/5438060/diff/2027/scm/define-grob-properties.scm
> File scm/define-grob-properties.scm (right):
>
>
http://codereview.appspot.com/5438060/diff/2027/scm/define-grob-properties.sc...
> scm/define-grob-properties.scm:1049: be drawn above and below the staff.
> If no span bar is in a position,
> be drawn below and above the staff, respectively.
Sorry, I don't understand this comment. Could you please rephrase it?
Cheers,
MS
On Thu, 08 Dec 2011 00:17:56 -0800, mike@apollinemike.com <mike@apollinemike.com> wrote: >> http://codereview.appspot.com/5438060/diff/2027/scm/define-grob-properties.scm#newcode1049 >> scm/define-grob-properties.scm:1049: be ...
13 years, 4 months ago
(2011-12-08 08:38:13 UTC)
#24
On Thu, 08 Dec 2011 00:17:56 -0800, mike@apollinemike.com
<mike@apollinemike.com> wrote:
>>
http://codereview.appspot.com/5438060/diff/2027/scm/define-grob-properties.sc...
>> scm/define-grob-properties.scm:1049: be drawn above and below the staff.
>> If no span bar is in a position,
>> be drawn below and above the staff, respectively.
>
> Sorry, I don't understand this comment. Could you please rephrase it?
>
I suggest swapping "above"-"below" because I think you switched the order of
contents in has-span-bar.
Le Dec 8, 2011 à 9:37 AM, Keith OHara a écrit : > On Thu, ...
13 years, 4 months ago
(2011-12-08 08:47:55 UTC)
#25
Le Dec 8, 2011 à 9:37 AM, Keith OHara a écrit :
> On Thu, 08 Dec 2011 00:17:56 -0800, mike@apollinemike.com
<mike@apollinemike.com> wrote:
>
>>>
http://codereview.appspot.com/5438060/diff/2027/scm/define-grob-properties.sc...
>>> scm/define-grob-properties.scm:1049: be drawn above and below the staff.
>>> If no span bar is in a position,
>>> be drawn below and above the staff, respectively.
>>
>> Sorry, I don't understand this comment. Could you please rephrase it?
>>
>
> I suggest swapping "above"-"below" because I think you switched the order of
contents in has-span-bar.
>
Ah, gotchya. Done.
Cheers,
MS
Hi Mike, please excuse me disturbing the discussion. I do not understand it, so I ...
13 years, 4 months ago
(2011-12-08 23:51:22 UTC)
#26
Hi Mike,
please excuse me disturbing the discussion. I do not understand it, so
I simply ask:
Will these patch fix the problem drawing the hairpin under a new
KeySignature at the line-end as shown with this example?
{
c'1\< \key bes\major \break
d'2 c'\!
}
(Perhaps you remember helping me to create a work-around for this:
http://lists.gnu.org/archive/html/lilypond-user/2011-08/msg00583.html
)
If not, would it be hard to do so?
Cheers,
Harm
Issue 5438060: Adds padding between Hairpins and SpanBars.
(Closed)
Created 13 years, 5 months ago by MikeSol
Modified 13 years, 3 months ago
Reviewers: pkx166h, carl.d.sorensen_gmail.com, mike_apollinemike.com, Keith, thomasmorley65
Base URL:
Comments: 17