bug-lilypond
[Top][All Lists]

## Re: improved accidental algorithm (with images)

 From: Jan Nieuwenhuizen Subject: Re: improved accidental algorithm (with images) Date: Fri, 26 Jul 2002 18:09:07 +0200 User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu)

```Werner LEMBERG <address@hidden> writes:

> As soon as I know how to shift accidentals, I will provide images.
> Here my algorithm again, this time with images.

Thanks.  Images help a lot to get started.

> I forgot to put Wanske's book into my travelling baggage -- can
> someone please test my algorithm against her collected devils?

I'm sorry not to have responder earlier; I was certain that Han-Wen
had our copy of Wanske; and until now I didn't know anything about
accidental (re)ordering rules.  This afternoon, I took a brief look at
Wanske.  She lists some rules of which the most important seem to be:

* highest-y accidental first, then lowest, then next highest etc.

* x-position of accidentals take after x-position of noteheads in
chords

* accidentals for octaves always have same x-position (unless maybe
this eats too much x-space in chords with accidentals on
seconds).  See Fig 2.

* accidentals on seconds are kerned extra tightly to the note heads

but it looks like you knew that.

Then, there's a kerning table for type of accidental and note
intervals in chord.  Most important is, not to use more space than
necessary.

As I'll be going on vacation tomorrow, I haven't analyzed your
algorithm yet, but I'll take a good look at it when I'm back.

Looking at the pictures, your algorithm solves a number of bugs, and
even get things almost right in hairy cases.

However, I don't understand why in your chord3.png, you put the flat
closer to the chord than the c's natural sign.  See Fig 1.

Greetings,
Jan.

```

m-page1.png
Description: fig 1 (chord3 redo)

n-page1.png
Description: fig 2

```

--
Jan Nieuwenhuizen <address@hidden> | GNU LilyPond - The music typesetter
http://www.xs4all.nl/~jantien       | http://www.lilypond.org
```