Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(7)

Issue 14640043: there are actually four commits:

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by benko.pal
Modified:
10 years, 6 months ago
Reviewers:
Keith, dak
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

there are actually four commits: commit 1: Create exact-rational? predicate commit 2: Create completionFactorUnit commit 3: Change regtests for completion engravers for illustrating issue 3560 (and using completionFactorUnit) commit 4: Issue 3560: make use of completionFactorUnit in completion engravers factor out chopping into a base class Completion_engraver_base Both the Completion_heads_engraver and Completion_rest_engraver have to make the decision whether to interpret a scale factor on a note either as actually scaling the note duration itself (similar to \times/\tuplet) or as a means of specifying an inconvenient length, like a full bar note in 5/8 time or a multi-measure note (or, actually, combination of all these). The completion engravers need to make an actual decision here. The previously employed heuristic was that integer scale factors were interpreted as a multi-measure note while other rational scale factors implied an actual scaling of the note value. In the first case, any durations produced by the completion engravers received a scale factor of 1, in the second, they inherited the original scale factor. The visual note duration needed for filling the measure depended on the chosen scale factor. This heuristic led to surprises like issue 1772: the behavior of issue 1772 was triggered by scale factors like *3/2 but not by *3/1. Now the heuristic has been dropped, so either scale factor will lead to the observed behavior. Since both behaviours are required (see issue 1532), introduce a means to control the decision explicitly, defaulting to the existing behaviour. The device chosen in this patch is completionFactorUnit.

Patch Set 1 #

Patch Set 2 : new regtest annotated (and changed) a bit #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+366 lines, -230 lines) Patch
M input/regression/completion-heads-factor.ly View 1 1 chunk +110 lines, -15 lines 0 comments Download
M input/regression/completion-rest.ly View 2 chunks +11 lines, -8 lines 2 comments Download
A lily/completion-engraver-base.cc View 1 chunk +117 lines, -0 lines 0 comments Download
M lily/completion-note-heads-engraver.cc View 6 chunks +10 lines, -104 lines 0 comments Download
M lily/completion-rest-engraver.cc View 7 chunks +10 lines, -103 lines 0 comments Download
A lily/include/completion-engraver-base.hh View 1 chunk +74 lines, -0 lines 0 comments Download
M scm/c++.scm View 1 1 chunk +3 lines, -0 lines 0 comments Download
M scm/define-context-properties.scm View 1 chunk +30 lines, -0 lines 2 comments Download
M scm/lily.scm View 1 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 3
benko.pal
new regtest annotated (and changed) a bit
10 years, 6 months ago (2013-10-13 21:07:29 UTC) #1
Keith
None of the examples show \set completionFactorUnit = n/m actually helping. Is there an example ...
10 years, 6 months ago (2013-10-25 07:04:55 UTC) #2
dak
10 years, 6 months ago (2013-10-25 07:35:31 UTC) #3
On 2013/10/25 07:04:55, Keith wrote:
> None of the examples show \set completionFactorUnit = n/m  actually helping. 
Is
> there an example where this property is more useful than a boolean switch?

No, because completionFactorUnit is only used for determining the
position of a boolean switch.  You can always throw this switch
yourself since the engraver only works with a single duration at a
single point of time.

> By contrast, the earlier patch <http://codereview.appspot.com/14633043> using
> completionLongestScaled to divide long- versus short notes, made the examples
in
> the bug-reports work by default, and included documentation.

completionLongestScaled does not work satisfactorily with
\scaleDurations, the main reason for having this patch in the first
place.  It's also incompatible to the previous behavior.

> Either this patch or the earlier one could be augmented by allowing
> users to set 'completionFactor' to specify the output scale-factor
> that the engraver should use for 'long' notes, for the case Pál
> brought up \scaleDurations 2/3 { a1.*9 }

Sure, but that's leaving the "binary switch" area and is an orthogonal
advancement.  You still need to decide how to throw the switch.

>
https://codereview.appspot.com/14640043/diff/3001/input/regression/completion...
> input/regression/completion-rest.ly:25: r4 ^"r4" r8*4 ^"r8*4" r8*8 ^"r8*8"
> The un-split r8*4 makes the test hard to interpret.

The un-split r8*4 makes the whole behavior of Completion_*_engraver
hard to interpret.  That was my point for the very first patch
_always_ maintaining the current scale factor.  It is the only
behavior where the output of Completion_*_engraver is _consistent_
between notes crossing a completion boundary and those that don't.

The point of a regression test is to demonstrate that the behavior
works as designed.  I consider it a poor design decision to treat some
notes differently as others, but _that's_ _what_ _people_ _want_.
We'd have been finished a month ago if they didn't.  And so we should
document the consequences of what they want.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b