lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Vertical alignment of the figures in BassFigureAlignment


From: Neil Puttock
Subject: Re: Vertical alignment of the figures in BassFigureAlignment
Date: Fri, 26 Feb 2010 20:45:58 +0000

On 25 February 2010 17:50, Reinhold Kainhofer <address@hidden> wrote:

> It must be a very simple, stupid error in my code, but I'm simply unable to
> locate it. Here is my current patch (relativ to origin/master):
>    http://codereview.appspot.com/224052

Wow, that's a great engraver description, Reinhold.  It'd be useful to
have that kind of detail in some of the other engravers.

> Does anyone spot the error? Or can anyone enlighten me how exactly the
> vertical ordering of the figures happens?

+ // We haven't found a continued figure, so append this event as a new figure:

This creates a new BassFigureLine; as far as I can see, each new
BassFigureLine added to the alignment spanner is automatically stacked
above/below (depending on 'stacking-direction) the previous element in
the grob array.

I think you'll need to defer BassFigureLine creation if a continuation
is found, then decide whether a new BassFigureLine is required based
on the figure number: if it slots in, then it should be added to an
existing line, otherwise a new spanner will be required.  Then you'd
also need to reorder the grob-array to ensure BassFigureLines which
should be positioned closer the stave come first (or only add all the
lines to the alignment spanner once correct ordering is known, which
probably means waiting until announce_end_grob () is called for a
BassFigureAlignment).

For example, consider the following:

<6 4> <8 5 4>

At the second timestep, the engraver should add the 4 as a
continuation, then work out that the 5 and 8 are higher, slotting the
5 into the existing group created for the 6 and creating a new group
for the 8.  Then the BassFigureLines should be added to the alignment
spanner, starting with the 8 to ensure it's the first line in the
stack.

Cheers,
Neil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]