The following solution avoids the need to manually figure out the adjustment value and might be a starting point for a clever Scheme hacker to do a fully automated solution. What it does is

\layout{
 \context{
   \Lyrics
% Make sure that the alignment point of the syllable is aligned with the note head: \override LyricText #'X-offset = #ly:self-alignment-interface::centered-on-x-parent
 }
}

\relative c'{ c d e f }
\addlyrics {
 % Split the syllable into two halves to set the alignment point:
 \markup {\combine \right-align Dddda \left-align d }
 \markup {\combine \right-align da \left-align dddddd }
 \markup {\combine \right-align Dda \left-align dd }
 \markup { \right-align Dddda }
}

Unfortunately, it makes aligns the note head with the right hand end of the wovel, so it's not perfect. If we try to split the syllable into three parts (before first wovel, wovel and the remainder) and use \center-align on the wovel, you are hit by the same problem as in http://code.google.com/p/lilypond/issues/detail?id=732&q=markup Note also that the \left-align is redundant and can be removed without changing the
results.

   /Mats

Kieren MacMillan wrote:
Hi Jiri,

I've attached a hint on how to do it manually.
If you need an automated process, perhaps someone on the list will take you up on your sponsorship offer.

Hope this helps!
Kieren.

\version "2.12"

\paper { ragged-right = ##f }

lyricX =
    #(define-music-function (parser location saX) (number?)
        #{
            \once \override LyricText #'self-alignment-X = $saX
        #})

theNotes = \relative
{
    g a b c | d c b a | g1
}
theLyrics = \lyricmode
{
\lyricX #-0.9 Each syl -- \lyricX #0.2 la -- ble’s \lyricX #-0.5 vowel \lyricX #-1.8 is \lyricX #-1 on \lyricX #1 the \lyricX #-0.4 note.
}

\score
{
    <<
        \new Voice = "melody" \theNotes
        \new Lyrics \lyricsto "melody" \theLyrics
    >>
}

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

--
=============================================
        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: mats.bengts...@ee.kth.se
        WWW: http://www.s3.kth.se/~mabe
=============================================



_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to