[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Obscure melisma fail
From: |
David Kastrup |
Subject: |
Re: Obscure melisma fail |
Date: |
Wed, 09 Sep 2015 18:57:02 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
David Kastrup <address@hidden> writes:
> Here is the difference: The first variant adds the lyrics to \new Staff
> \altoOneVoice. The second variant adds the lyrics to { d'2 ... } even
> _before_ \relative is called. \addlyrics is sort of sticky. Once the
> \addlyrics is sucked _into_ the \relative, it does not have a chance to
> combine with \new Staff in a useful manner. So basically you get
>
> \score {
> <<
> \new Staff \relative << \new Voice="xxx" { d'2 ... cis}
> \new Lyrics \lyricsto "xxx" ... >>
> >>
> }
>
> Or something like that. Lesson: \addlyrics is for simple cases.
Here is the output after making \displayLilyMusic stupid about
\addlyrics and somewhat more \verbose about the result of \relative:
altoOneVoice = \relative {
d'2\melisma e4\melismaEnd cis
}
altoTwoVoices = \relative {
<<
{ d'2\melisma e4\melismaEnd cis }
\new Voice { \voiceTwo s1 }
>>
}
altText = \lyricmode {
side, sit
}
\markup \column { "One voice in a music variable" "(center-aligned melisma)" }
\score {
\displayLilyMusic
<<
\new Staff \altoOneVoice
\addlyrics \altText
>>
}
% same music as above, but explicitly written out in the \score block
\markup \column { "One voice explicitly written out in \score block"
"(left-aligned melisma)" }
\score {
\displayLilyMusic
<<
\new Staff \relative {
d'2\melisma e4\melismaEnd cis
}
\addlyrics \altText
>>
}
/usr/local/tmp/lilypond/out/bin/lilypond bibo.ly
GNU LilyPond 2.19.27
Processing `bibo.ly'
Parsing...
<< << \new Staff = "uniqueContext0" \absolute { d'2 \melisma e'4 \melismaEnd
cis'4 } \lyrics \lyricsto "uniqueContext0" { side, sit } >> >>
<< \new Staff \absolute << \context Voice = "uniqueContext1" { d'2 \melisma e'4
\melismaEnd cis'4 } \lyrics \lyricsto "uniqueContext1" { side, sit } >> >>
--
David Kastrup
Re: Obscure melisma fail, David Kastrup, 2015/09/09