lilypond-devel
[Top][All Lists]
Advanced

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

Re: RFC: new vertical layout engine


From: Joe Neeman
Subject: Re: RFC: new vertical layout engine
Date: Wed, 17 Jun 2009 14:32:53 +0300



On Tue, Jun 16, 2009 at 2:50 PM, Reinhold Kainhofer <address@hidden> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Dienstag, 16. Juni 2009 11:52:09 schrieb Joe Neeman:
> On Mon, Jun 15, 2009 at 9:05 PM, Reinhold Kainhofer

> This will certainly the possible in the layout code, but I don't see how to
> make it nicely accessible through properties. Currently, the information
> about staff groups doesn't make it as far as the backend.

Then that's the main problem. The staff groups are the prime key to vertical
spacing, since they group the score, which should also be reflected in the
vertical layout.

Would it be possible to derive appropriate properties for each staff from the
grouping when the grouping is still available, so that the vertical alignment
then has the correct settings derived from the grouping?

Not easily, because we don't know the line breaking (and therefore we don't know which staves will disappear) at that point. I think it can be done, though, by adding a new grob, StaffGrouper say, to represent the staff grouping and preserve that information all the way through page-breaking. I'll do this next and hopefully have something workable in a few days.

> > - -) Fixed positioning of staves/contexts should be possible, even if
> > some contexts are killed (in particular, when there are several measures
> > where a vocal voice is quiet, the lyrics context is automatically killed
> > meanwhile and
> > the explicit positioning is messed up right now.
>
> I'm not sure exactly what you mean by this. Do you mean that
> 'alignment-offsets in 'line-break-system-details should include the
> position of dead staves as well as live ones?

No, I'm not talking about staves, I'm talking mainly about lyrics line, which
are also included in the alignment-offsets. As an example, take the following
sample score, which does not have any explicit positioning yet:
http://www.fam.tuwien.ac.at/~reinhold/LilyPond/VerticalStretching/alignment_offsets_lyrics_nosetting.pdf
http://www.fam.tuwien.ac.at/~reinhold/LilyPond/VerticalStretching/alignment_offsets_lyrics_nosetting.ly

Now assume that you want the staves on the exact same position (i.e. the exact
same spacing, e.g. starting at 0, -15, -30 and -40. The first two staves have
lyrics to be placed at -5 and -20 (but also have some lines with only rests
and no lyrics).
I've run into this situation when writing Vierne's Messe Sollennelle, which
has four choir voices and two organs. I wanted the staves to be in the exact
same position on every page...
So, of course you would set the alignment-offsets to:
\layout {
 \context { \Score
   \override NonMusicalPaperColumn #'line-break-system-details =
#'((alignment-offsets . (0 -5 -15 -20 -30 -40)))
 }
}

And now look at the result:
http://www.fam.tuwien.ac.at/~reinhold/LilyPond/VerticalStretching/alignment_offsets_lyrics.pdf
http://www.fam.tuwien.ac.at/~reinhold/LilyPond/VerticalStretching/alignment_offsets_lyrics.ly

The first system behaves as expected, but as soon as one staff does not have
lyrics assigned in one line, the next staff will be placed where the lyrics
should have been and the spacing is totally messed up.
Note that there is no setting to prevent the lyrics context from vanishing, so
currently the explicit positioning is useless for vocal music.

What if I made alignment-offsets only apply to "spaceable" lines (ie. staves)? That is, the alignment-offsets list contains a number for every staff. To space the lyrics, you would need to override some setting in the lyrics context that specifies how to distribute lyrics between staves, which have their position fixed by alignment-offsets. There's still the question, though, of whether alignment-offsets should contain offsets for the harakiri-ed staves.

Cheers,
Joe


reply via email to

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