The manual does show how to use a pre-defined variable with the more
complex yric modes. So I tried this too. Below is the actual
code (rather than some pseudo code like above) that I used. You can
see I am trying to use lyricmode and lyricsto on the Soprano voice
(the only one for now). The music is enclosed between << and >>
because of course I really want to have
several voices (sop,mez,alto) but in finding the simplest version of
what I am doing that fails, I have pulled the other voices out.
The error I get is
warning: cannot find Voice `sop'
(although I have defined it), and the resultant type-set file has
two staffs; one empty, the second with
the actual soprano voice notes and no lyric.
As far as I can see I have followed the examples in the manual.
I note that if I remove the << and >> this error message does not
occur,
but the same wrong output arises.
Perhaps I should be using some of the other commands like \score etc
but
I don't really know what they are for at this point (they just start
appearing
in the manual without explanation).
\include "english.ly"
\version "2.6.3"
\midi{ \tempo 4=72 }
\header {
title = \markup { "Test Piece" }
composer = \markup { "Mr. Wiggle" }
poet = \markup { "Mr. Biggles" }
}
common = {
\key g \major
\time 3/4
}
%
sopNotes = {
\relative c' {
\set Staff.instrument = \markup {Soprano}
\tempo 4=80
\common
\clef treble
e'2 d4 c2 <b d>4 a8( b) c2
}
}
%
%
sopLyric = \lyricmode {
One Two One Two One __ Two
}
%
<<
\context Voice = sop {
\new Staff {
\sopNotes
}
}
\lyricsto "sop" \new Lyrics \sopLyric