lilypond-devel
[Top][All Lists]

## Re: * Fix arpeggio overshoot for chords which reach centre line.

 From: n . puttock Subject: Re: * Fix arpeggio overshoot for chords which reach centre line. Date: Wed, 01 Oct 2008 14:28:53 -0700

```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
Line 108: y += rint (squiggle.extent (Y_AXIS).length ()))
while the original is obviously wrong for the .ly you show, the fix
```
```looks fishy
```
```to me as you would be accumulating roundoff errors. The loop should be
```
```
```
```

perhaps to prevent the problem, there could be something like

while (mol.extent(Y_AXIS) + 1.0 <  heads[RIGHT])

(where 1.0 is intelligently chosen.)
```
```
That's similar to how I approached it originally, without changing the
loop,

where EPS = 1e-3.

I decided to use rint () instead since I can't see a situation where it
wouldn't work (obviously apart from the case where somebody changes
Arpeggio #'font-size); isn't the extent of the squiggle glyph
deliberately set to be one staff-space, so it fits between two staff
lines exactly?

The while loop looks more elegant though, of course.

This is possibly a stupid question, but why are the directions for the