lilypond-user
[Top][All Lists]
Advanced

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

Re: Using addlyrics with a variable


From: Neil Killeen
Subject: Re: Using addlyrics with a variable
Date: Mon, 10 Oct 2005 14:08:30 +0000

ah indeed it doesn't !

thanks
Neil



The problem is that you have declared a Staff context within
a Voice context, which doesn't make sense. Just do

\score{
<<
\context Voice = sop {
      \sopNotes
 }
 \lyricsto "sop" \new Lyrics \sopLyric

>>
}

or

\score{
<<
\new Staff {
   \context Voice = sop {
      \sopNotes
   }
 }
 \lyricsto "sop" \new Lyrics \sopLyric

>>


 /Mats

}
Neil Killeen wrote:


Mats, Han

thanks for your replies.  SInce I imagine I will need add some point to
deal with the more complex \lyricsto command, do you have
an idea about the second problem where it doesn't recognize
the declared Voice ?

thanks
Neil



Neil Killeen wrote:


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





--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================







reply via email to

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