lilypond-user
[Top][All Lists]
Advanced

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

Re: Aligning multiple verses to alternative notes in the melody


From: Trevor Daniels
Subject: Re: Aligning multiple verses to alternative notes in the melody
Date: Tue, 18 Dec 2012 17:58:18 -0000

Frederick, you wrote Aligning multiple verses to alternative notes in the melody

> Imagine that there are substantial variations in the number of syllables in
> the lyrics between verses. So one verse might have "you" against a half
> note, while the next would have "egotistical twerp" against a run of five
> sixteenths and a dotted eighth.

>>> What I want is something like this:
>>>
>>> 4 4 4/8 8 4 | 4 4/8 8 4 4
>>> a b c     d   e f     g h
>>>     a   b c   d e   f g h
>>>
>>> where '4's are quarter notes, '8's are eighth notes, and '4/8's are both.
>>>
>>> Here's a snippet:
>>>
>>> firstVerse = \lyricmode {  a b c d e f g h }
>>>
>>> skippy = #(define-music-function (parser location syllables) (number?)
>>>    #{ \repeat unfold $syllables { \skip 1 } #})
>>>
>>> LL = { \once \override LyricText #'self-alignment-X = #LEFT }
>>>
>>> secondVerse = \lyricmode { \skippy 2 \LL a_b c d \LL e_f g h }
>>>
>>> melodyMusic = \relative c'' {  c4 c4 << { \voiceOne c4 } \new Voice =
>>> "split" { \voiceTwo c8 [ c8 ] } >> c4 | c4 << { \voiceOne c4 } \new Voice =
>>> "split" { \voiceTwo c8 [ c8 ] } >> c4 c4 \bar "|." }
>>>
>>> \new Staff = "voice" <<
>>>   \new Voice = "melody" << \voiceOne \global \melodyMusic>>
>>>   \new Lyrics \lyricsto "melody" \firstVerse
>>>   \new Lyrics \lyricsto "melody" \secondVerse
>>> >>

I'd do your original snippet this way:

firstVerse = \lyricmode {  a b c d }

skippy = #(define-music-function (parser location syllables) (number?)
   #{ \repeat unfold $syllables { \skip 1 } #})

secondVerse = \lyricmode {
  \skippy 2
  \set ignoreMelismata = ##t
  a b
  \set ignoreMelismata = ##f
  c
}

melodyMusic = \relative c'' {
  c4 c4 \slurDashed c8_( \noBeam c8) \slurSolid c4
}

\new Staff = "voice" <<
  \new Voice = "melody" << \voiceOne \melodyMusic>>
  \new Lyrics \lyricsto "melody" \firstVerse
  \new Lyrics \lyricsto "melody" \secondVerse
>>

This automatically aligns the syllables correctly, so no need for your LL.

Trevor

reply via email to

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