bug-lilypond
[Top][All Lists]
Advanced

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

Re: Obscure melisma fail


From: tisimst
Subject: Re: Obscure melisma fail
Date: Wed, 9 Sep 2015 10:04:56 -0700 (MST)


On 9/9/2015 10:57 AM, David Kastrup [via Lilypond] wrote:
> David Kastrup <[hidden email] 
> </user/SendEmail.jtp?type=node&node=180901&i=0>> 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,

This is a great explanation and almost exactly what I suspected after 
reading through the comments in the parser. Personally, I really 
discourage users from using \addlyrics except in the simplest of 
situations. I almost NEVER use it myself.

Anyways, quark explained, but also raises some questions about how using 
variables affects the internal representation of the data. I'm certainly 
not concerned with it, but it still is curious. Has anyone found other 
instances where this causes problems? (maybe this opens a bad can of 
worms...)

Thanks, as always, for your excellent work and explanations.

- Abraham




--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Obscure-melisma-fail-tp180855p180902.html
Sent from the Bugs mailing list archive at Nabble.com.


reply via email to

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