Ferenc Wagner wrote:
Doug Asherman <[EMAIL PROTECTED]> writes:


Ferenc Wagner <[EMAIL PROTECTED]> writes:


I get
warning: cannot find Voice: choir
when compiling the attached file.  The output nevertheless
seems good.  The warning disappears if I comment out the
\set command.  Where should I put it to avoid warnings?

\version "2.2.1"
\score {
    <<
        \new Staff {
            \set Staff.midiInstrument = "choir aahs"
            \context Voice = "choir" \notes { c' d' }
        }
        \lyricsto "choir" \new Lyrics \lyrics { du dumm }
    >>
}


You need to "group" the directives; instead of

\new Staff {
  \set blah woof
  \blah blah
}

try

\new Staff <<
  \set blah woof
  \etc etc
>>

Hope this helps.


Indeed it does, thanks!  However, I can't say I understand
why.  Is the semantics of the LilyPond input language
discussed somewhere in the manual?  As a moderately
experienced user I don't feel like I know what I'm doing
when writing LilyPond sources.  Most of the time I got what
I want, but sometimes I have to guess or even ask.  :) Seems
like I miss a piece of documentation.  I can't think of
LilyPond as a programming language, which it looks like.
Reading this newsgroup make me think I'm not alone.  I miss
a definition of the language!  What does << >> precisely do,
after all?  Trying to ignite a constructive discussion...

In \new Staff { \set ... \context Voice ...}, you first do the property setting, then create the Voice context, which means that the "choir" Voice context doesn't exist from the beginning of the score (even though the property setting doesn't have any duration). With, \new Staff << ... >>, the to happen simultaneously. As has already been suggested by others, it's probably even better to do

\new Staff {
  \context Voice = "choir" \notes {
     \set Staff.midiInstrument = "choir aahs"
     c' d'
  }
}

to avoid the creation of extra contexts.

   /Mats


_______________________________________________ lilypond-user mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/lilypond-user

Reply via email to