lilypond-devel
[Top][All Lists]
Advanced

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

Re: I want to develop automatic lyric contraction


From: Han-Wen Nienhuys
Subject: Re: I want to develop automatic lyric contraction
Date: Mon, 22 Jun 2009 11:29:25 -0300

On Mon, Jun 22, 2009 at 9:25 AM, Bertalan Fodor
(LilyPondTool)<address@hidden> wrote:
> I'd like to dig myself into the C++ source of LilyPond.
> I have a long-wished feature, for support automatic lyric contraction.
> That means the following:
> When there is not enough space for a hyphen to appear, the hyphen is
> removed. Like instead of "yeah - yeah - yeah", "yeah yeah yeah". In these
> cases I would like LilyPond to automatically contract it to "yeahyeah -
> yeah", moving the syllables, taking kerning into account.
>
> Do you think it is feasible without major rewrite? I do see some callback to
> the lyric syllable in the hyphen engraver, but I'm not sure about it.

I think it would be a difficult to implement.  You'd have to replace
the hyphen code and write code that checks the distance between this
syllable and the next; if that distance is too small, it would remove
or make transparent the following syllable, and change the text of the
1st to be the contracted version.

There are some other hairy issues: in general, any contraction can
change the spelling of a word, so what happens if you have


   a -  b - c - d - e

and it is set very tightly?  Any contraction change the spelling of
any syllable (and the space it takes up), so how do you decide between
contracting

  aB - c - d - e

and

  a - b - Cd - e

first?

the changed spelling may alter the size of the word, and may trigger
another round of contractions.

-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

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