I'm currently looking into adding lyrics support for cue notes (which is 
absolutely essential for large orchestral parts!). 

The good thing is that \addQuote also collects the lyrics correctly, so all 
the data is there, just to be used.
My problem is how to create the CueLyrics context so that the lyrics will be 
placed above/below the appropriate staff. Cue note support in lilypond works 
by replacing the cued measures with a structure that essentially looks like 
<< 
  \new Voice ="cue" { \voiceOne cue notes extracted } 
  {\voiceTwo original notes, usually rests} 
>>

This is done at the very end of music processing.

Now, to add lyrics, I'm trying to also create a new CueLyrics context, which 
seems to work, except that it will always be placed below the whole system 
(since contexts created later are placed there...).

The solution is to specify align(Above|Below)Context for the lyrics context. 
Unfortunately, when inserting the cue notes/lyrics, I'm deep inside a voice.

So, how can I force the new lyrics context to be placed above the current 
staff (for which I don't know the context id)? Alternatively, is there a way 
to obtain the staff's context id from within a voice?

An example file is attached....

Thanks a lot,
Reinhold

PS: There also seems to be a slight spacing problem with alignAboveContext: 
The lyrics appear like they are attached to the staff above rather than the 
one below!
-- 
------------------------------------------------------------------
Reinhold Kainhofer, [email protected], http://reinhold.kainhofer.com/
 * Financial & Actuarial Math., Vienna Univ. of Technology, Austria
 * http://www.fam.tuwien.ac.at/, DVR: 0005886
 * LilyPond, Music typesetting, http://www.lilypond.org
\version "2.13.28"
\pointAndClickOff

% QUESTION: Is there any proper way to start a new Lyrics context inside a
%           Voice and align it above/below the CURRENT staff???
%           I.e. how can I get the context name of the current staff?
\score {<<
    % Case 1: \addlyrics used inside a voice. Problem: lyrics are placed below the whole system!
    \new Staff <<
      \new Voice = "Vc2" {
	c''2 d'8
	<< {c'4. d'4 e'4}
	  \addlyrics { D E F }
	>>
	e'2 }
      \new Lyrics \lyricsto "Vc2" { A B C D E F G H }
    >>
    % Dummy staff to see positioning of lyrics
    \new Staff <<
      \new Voice ="Vc" { c'4 d'4 e'2 f'4 e' d'} 
    >>
    
    % Case 2: \new Lyrics with explicit alignAboveContext. Works only if the 
    %         Staff's context name is explicitly given! I need a way to 
    %         position the lyrics above the current staff without knowing 
    %         the current staff's context id (or alternatively, a way to 
    %         obtain the current staff's context id programmatically)!
    \new Staff = "Vc3Staff" <<
      \new Voice = "Vc3" {
	c'8 c' c' c'
	<< \new Voice = "CueVoice" \relative c' {e e e e e e e e e e }
	  % This works as expected, but I need to extract the context name dynamically!
	  \new Lyrics \with { alignAboveContext = "Vc3Staff" } \lyricsto "CueVoice" { x y z zz }
	>> 
	d' d' d' d' }
    >>
    % Dummy staff to see positioning of lyrics
    \new Staff = "Vc4" <<
      \new Voice ="Vc4" { c'4 d'4 e'2 f'4 e' d'} 
    >>
>>}

Attachment: CueNotes_NewLyrics_DuringVoice.pdf
Description: Adobe PDF document

_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to