lilypond-user
[Top][All Lists]
Advanced

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

Re: Lyrics: \set associatedVoice


From: David Kastrup
Subject: Re: Lyrics: \set associatedVoice
Date: Fri, 28 Mar 2014 03:57:42 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Simon Albrecht <address@hidden> writes:

> Hello,
>
> I've got a problem: I'm typesetting a Brahms lied where some melismata
> are only for one stanza and not for the other. Now look at the
> following example (output attached):
>
> \version "2.19.3"
>
>
> << \new Staff <<
>
> \new Voice = "one" { \voiceOne c'4 c' c'8 c' c'4 }
>
> \new Voice = "two" { \voiceTwo s4 s c' s }
>
>>>
>
> \new Lyrics \lyricsto "one" {
>
> foo \set associatedVoice = "two"
>
> foo \set associatedVoice = "one"
>
> bar
>
> bar
>
> }
>
>>>
>
>
> The associated voice has to be set one syllable early, which I did,
> only the lyrics "come back" to voice "one" one note early: it should
> be for the last quaver and not for the second crotchet. It seems to me
> that the roots of this problem lie very deep. An optimal fix would of
> course be to make the effect of \set associatedVoice enter immediately
> rather than one syllable later, but this is probably far away.
> Can anyone think of a workaround?

Just keep the same associated voice throughout for the variant with most
syllables, flipping it between \voiceOne, \voiceTwo and \oneVoice as
needed.

I lean towards not using \lyricsto here but just placing the durations
in the lyrics.  That makes the timing unproblematic and robust against
slurs/beams/whatever, saving a lot of fiddling.

Maybe a cute LSR entry would be a Lyric_time_translator which is placed
in a lyricsto-governed context and then writes out the source file with
proper durations in all its lyrics so that you can then use this and
drop the lyricsto.

Then you need to get only one stanza synchronized at a time...

Associated voices still are good for not just aligning on the time but
note values.

> In case someone might ask why this is necessary, I attach what I
> already have of the entire lied also. The \makeOctaves function is
> from LSR 445 <http://lsr.di.unimi.it/LSR/Snippet?id=445> and I added
> it to scm/music-functions.scm or a similar one in order to always have
> it at hand.

Non-compilable examples are a nuisance.  You can just add

makeOctaves =
#(define-music-function (parser location oct mus) (integer? ly:music?)
  (make-relative (mus) mus
   #{ << \transpose c' $(ly:make-pitch oct 0 0) $mus $mus >> #}))

to the code.  As opposed to LSR445, it should work fine with chords and
also absolute music.

-- 
David Kastrup



reply via email to

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