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

Issue 6453: * Fix arpeggio overshoot for chords which reach centre line. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 6 months ago by Neil Puttock
Modified:
14 years, 8 months ago
Reviewers:
hanwenn
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

* Fix arpeggio overshoot for chords which reach centre line. This patch fixes a rounding error in Arpeggio::print () that occurs when a chord reaches the centre line, resulting in an extra squiggle being added.

Patch Set 1 #

Patch Set 2 : Use while loop for squiggle. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+21 lines, -3 lines) Patch
A input/regression/arpeggio-no-overshoot.ly View 1 chunk +15 lines, -0 lines 0 comments Download
M lily/arpeggio.cc View 1 2 chunks +6 lines, -3 lines 3 comments Download

Messages

Total messages: 4
hanwenn
http://codereview.appspot.com/6453/diff/1/3 File lily/arpeggio.cc (right): http://codereview.appspot.com/6453/diff/1/3#newcode108 Line 108: y += rint (squiggle.extent (Y_AXIS).length ())) while the ...
15 years, 6 months ago (2008-10-01 00:56:41 UTC) #1
Neil Puttock
On 2008/10/01 00:56:41, hanwenn wrote: > http://codereview.appspot.com/6453/diff/1/3 > File lily/arpeggio.cc (right): > > http://codereview.appspot.com/6453/diff/1/3#newcode108 > ...
15 years, 6 months ago (2008-10-01 21:35:03 UTC) #2
hanwenn
lgtm http://codereview.appspot.com/6453/diff/205/6 File lily/arpeggio.cc (right): http://codereview.appspot.com/6453/diff/205/6#newcode22 Line 22: #define EPS 1e-3 use const http://codereview.appspot.com/6453/diff/205/6#newcode109 Line ...
15 years, 6 months ago (2008-10-03 21:52:28 UTC) #3
Neil Puttock
15 years, 5 months ago (2008-10-05 21:21:29 UTC) #4
http://codereview.appspot.com/6453/diff/205/6
File lily/arpeggio.cc (right):

http://codereview.appspot.com/6453/diff/205/6#newcode109
Line 109: while (mol.extent (Y_AXIS).length () + EPS < heads.length ())
On 2008/10/03 21:52:28, hanwenn wrote:
> why should this be 1e-3? Can you look at some real scans do determine what a
> reasonable number?

It's appreciably larger than the rounding error, which is in the region of 1e-16
for a global-staff-size of 20, but small enough that it doesn't interfere with
smaller staff sizes.

> Also, I'd probably write
> 
>   while (mol.extent + squiggle_length < heads.length() + overshoot) 
> 

I've tested this, but it breaks cross-staff and cross-voice arpeggios, which
tend to miss the desired notehead by a squiggle.
Sign in to reply to this message.

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