lilypond-user
[Top][All Lists]
Advanced

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

Re: Cannot find voice


From: Mats Bengtsson
Subject: Re: Cannot find voice
Date: Mon, 24 May 2004 12:50:59 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040113



Ferenc Wagner wrote:
Doug Asherman <address@hidden> writes:


Ferenc Wagner <address@hidden> 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




reply via email to

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