lilypond-devel
[Top][All Lists]
Advanced

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

Re: Issue 3457: Add snippet `Using \partcombine with lyrics'. (issue 113


From: dak
Subject: Re: Issue 3457: Add snippet `Using \partcombine with lyrics'. (issue 11328043)
Date: Fri, 19 Jul 2013 08:27:20 +0000

On 2013/07/19 06:10:17, Mark Polesky wrote:
On 2013/07/18 20:47:05, dak wrote:
> Folks, this is the reference manual, not "obscure hacks
> for adventureous geeks".  If we anticipate that a task is
> common enough to warrant an entry in the reference manual,
> it warrants a user interface.

Fair enough.

> We might or might not want to cobble this user interface
> together using a technique like that, but if we are really
> proud of it, we can still point out that the
> implementation, to be found in xxx.ly, might be
> instructive.
>
> So what would be a nice and natural user interface, and
> what pieces are missing from it?

<<
   \new Staff \with { printPartCombineTexts = ##f } <<
     \new HiddenVoice = "voiceForLyrics" \sopranoNotes
     \new Voice {
       \key g \major
       \partcombine \sopranoNotes \altoNotes
     }
   >>
   \new Lyrics \lyricsto "voiceForLyrics" \words
>>

"HiddenVoice" could also be "LyricsVoice" I suppose, but
"HiddenVoice" seems more sematically flexible.

This interface could possibly also solve another problem
that I have from time to time: in chorales, when the voices
use the same lyrics but have slightly different rhythms,
sometimes it's preferable to print a lyric syllable *in
between* where it would fall in the different voices.  A
hidden voice (that the lyrics could align with) could solve
that (as long as it doesn't alter the spacing of the printed
voices, that is).

As for its usefulness, for me it would be an enormous
time-saver.  A lot of my LilyPond work is typesetting 4-part
choir pieces, and without this feature I often end up
entering two voices as one like this:

upperNotes = \relative d' {
   <d g>4 << { fis8( g) } \\ d4 } >> <d a'>4 <d g> |
   <d c'>4 <d c'> <d b'>2
}

... just so the Lyrics context has something to align to.

Ok.  Is the _output_ from the following what you'd consider appropriate?

sopranoNotes = { c''2 d''4 e'' }
altoNotes = { \repeat unfold 8 { a'16 g'16 } }
words = \lyricmode { Oh my head }

<<
  \new Staff \with { printPartCombineTexts = ##f \accepts "Devnull" } <<
    \new Voice {
      \key g \major
      \partcombine \sopranoNotes \altoNotes
    }
    \new Devnull = "aligner" { \sopranoNotes }
  >>
  \new Lyrics \lyricsto "aligner" \words


Basically, the question is whether we can do something like NullVoice
and get along without any engravers/properties in it.

https://codereview.appspot.com/11328043/



reply via email to

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