Hello Graham,

there are multiple ways to solve the problem and having different voice 
contexts for different lyrics is surely one of the better ways to handle it. 
You can it do cleaner like this:

% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
instrumental =
#(define-music-function (m) (ly:music?)
   #{ \context Voice = "instrumental" $m #})

notes = {
  \instrumental \repeat unfold 8 c'4
  \repeat unfold 8 d'4
}

words = \lyricmode { 
   one two three four 
}

<<
  \new Voice = "cantor" \notes
  \new Lyrics \lyricsto cantor { \words } 
>>

% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The issue with this is that this will cause trouble with engravers sitting at 
the voice level, so things like slurs and ties between these sections will 
fail.

One other way that does not have this issue would be to have the Lyric 
engraver believe that the instrumental notes are part of a melisma, which 
leads to the engraver ignoring them:

% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
notes = {
  \set melismaBusy = ##t
  \after 1*2 \unset melismaBusy
  \repeat unfold 12 c'4
}

words = \lyricmode { 
  one two three four 
}

<<
  \new Voice = "cantor" \notes
  \new Lyrics \lyricsto cantor { \words } 
>>
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

If you have lyrics before this it would be wise to only do this after the first 
instrumental note and add a single "" to the Lyrics to avoid it extending a 
previous melisma, so instead of

% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
notes = {
  4 4( 4 4)
  \set melismaBusy = ##t
  \after 1*2 \unset melismaBusy
  \repeat unfold 12 c'4
}

words = \lyricmode { 
  first text __
  one two three four 
}

<<
  \new Voice = "cantor" \notes
  \new Lyrics \lyricsto cantor { \words } 
>>
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

you’d get

% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
notes = {
  4 4( 4 4)
  \after 4 \set melismaBusy = ##t
  \after 1*2 \unset melismaBusy
  \repeat unfold 12 c'4
}

words = \lyricmode { 
  first text __
  ""
  one two three four 
}

<<
  \new Voice = "cantor" \notes
  \new Lyrics \lyricsto cantor { \words } 
>>
% ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cheers,
Valentin

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to