[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lyric alignment
From: |
Werner LEMBERG |
Subject: |
Re: lyric alignment |
Date: |
Sun, 08 Sep 2002 09:09:27 +0200 (CEST) |
> > I think there is a serious bug in lyric-align.ly. As soon as you
> > remove the second stanza, the `alignment' property of LyricText is
> > completely ignored which is *very* bad. Please fix this ASAP -- I
> > need this :-)
>
> this is hardly ASAP, but ehrrmmm, this is caused by
>
> 2002-07-28 Glen Prideaux <address@hidden>
>
> * lily/syllable-group.cc (set_lyric_align): Only fiddle
> with alignment if a note has more than a single lyric
> so single stanza songs are aligned correctly
>
> which was more or less put in by your request
Well, shit happens :-) To be serious, this is a bad change, not
reflected in LilyPond's manual BTW.
The documentation of automaticPhrasing says:
If set, the @ref{Lyric_phrasing_engraver} will match note heads of
context called Voice X to syllables from LyricsVoice called
X-<something>. This feature is turned on by default. See the
example file @file{lyrics-multi-stanza.ly}.
Alignment isn't mentioned at all, and I strongly believe that this is
the right thing!
IMHO we have to extend/separate the parameters to control alignment:
One set for alignment relative to the stanzas and another set to
control how the stanzas are aligned relative to the note. Examples:
alignment = centered
stanza-alignment = right
o
This
is
a
test
alignment = right
stanza-alignment = centered
o
This
is
a
test
alignment = left
stanza-alignment = left
o
This
is
a
test
The default values should be
alignment = centered
stanza-alignment = centered
and for multiple stanzas one has to say
alignment = centered
stanza-alignment = left
More complicated alignment should be possible also (by overriding
stanza-alignment locally):
o
This
is
a
test
Overriding `alignment' in different stanzas makes no sense. Perhaps
the last `alignment' value for a given note should be used.
I haven't actually looked into the LilyPond source code, but it is
rather straightforward to implement my suggestion:
1. Collect all syllables for a given note.
2. Get the length of the longest syllable and create an \hbox with
this length.
3. Put all syllables into this \hbox line by line, using \hss on
either the left, right, or both sides according to
`stanza-alignment'.
4. Align the \hbox with the note head according to `alignment',
`begin-alignment', and `end-alignment'.
[You probably won't actually use such an \hbox, but it makes the
description easier to understand.]
It's not clear to me whether global alignment on punctuation is a good
thing at all. After some thinking I believe that it should be dropped
and replaced with a per-note control as suggested above.
Werner
- lyric alignment, Han-Wen Nienhuys, 2002/09/07
- Re: lyric alignment,
Werner LEMBERG <=