[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible fix for #372. (issue2228042)
From: |
Carl . D . Sorensen |
Subject: |
Re: Possible fix for #372. (issue2228042) |
Date: |
Sun, 19 Sep 2010 08:29:24 +0000 |
As currently implemented, this patch fails when \partial is called in
the middle of a measure. I'm not sure \partial *should* work when
called in the middle of a measure, but we have plenty of history on
-user where it is called in the middle of a measure.
This code:
\version "2.13.34"
{
c''4 c''
\partial 4
c'' c'' c''
}
Makes a measure 5/4 long, rather than 3/4, which the old code would have
done.
I've put the code that duplicates the previous behavior in the comments
below.
P.S. How should one handle a code variant when doing reviews on
Rietveld? Should we create a new issue? Should we show alternate code
in comments?
Thanks,
Carl
http://codereview.appspot.com/2228042/diff/1/lily/partial-iterator.cc
File lily/partial-iterator.cc (right):
http://codereview.appspot.com/2228042/diff/1/lily/partial-iterator.cc#newcode42
lily/partial-iterator.cc:42: ctx->set_property ("measurePosition", (now
- length).smobbed_copy ());
This code fails when \partial is called in the middle of a measure.
I did the following to get it to work:
Moment now_grace = Moment (0, ctx->now_mom ().grace_part_);
ctx->set_property ("measurePosition", (now_grace - length).smobbed_copy
());
http://codereview.appspot.com/2228042/