lilypond-user
[Top][All Lists]
Advanced

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

Re: trying to attach lyrics to global variable in /score


From: Ryan Michael
Subject: Re: trying to attach lyrics to global variable in /score
Date: Sun, 3 Jan 2016 15:33:39 -0800

Thank you for the reminder, so he is a complete, however abridged version of my code: 


viola = \new Voice \relative c' {
c1 c1 c1
}

recorder = \new Voice \relative c' {
c1 c1 c1
}

verseOne = \lyricmode {
  m -- -- -- 
}

\score {
  \new StaffGroup <<
   
   \new Staff <<
  \new Voice \global
  \new Voice = "recorder" \recorder

>>
\new Lyrics \lyricsto "recorder" \verseOne
  


 

    \new Staff << \global \viola >>
  >>

  \layout { }
  \midi { }
}

And I am still getting the same error: 

cannot find Voice `recorder'

On Sun, Jan 3, 2016 at 3:26 PM, Simon Albrecht <address@hidden> wrote:
Hello Ryan,

please always reply on-list. Others may find the solution helpful as well.
Also, please send complete compilable examples (with a version statement), else it’s difficult to figure out the problem.
That said: The following code works for me.

%%%%%%%%%%
\version "2.18.2"
global = { s1 }
recorder = { c''1 }
verseOne = \lyricmode { test }
\score {
  \new StaffGroup <<

    \new Staff <<
      \new Voice \global
      \new Voice = "recorder" \recorder
    >>
    \new Lyrics \lyricsto "recorder" \verseOne
  >>

  \layout { }
  \midi { }
}
%%%%%%%%%%%%%%

It’s more logical IMO to keep the Lyrics outside the Staff, but both work.

HTH, Simon

On 04.01.2016 00:21, Ryan Michael wrote:
Hallo Simon,
So I have tried to use one of your solutions. specificalyl this one:

\score {
  \new StaffGroup <<
   \new Staff <<
  \new Voice \global
  \new Voice = "recorder" \recorder
\new Lyrics \lyricsto "recorder" \verseOne
>>



    \new Staff << \global \viola >>
  >>

  \layout { }
  \midi { }
}


And I still get this error:

*cannot find Voice `recorder'*


On Sun, Jan 3, 2016 at 11:49 AM, Simon Albrecht <address@hidden <mailto:address@hidden>> wrote:

    On 03.01.2016 20:40, Ryan Michael wrote:

        I have the following lilypond code:


        \score {
          \new StaffGroup <<
           \new Staff << \global \recorder >>

           \new Lyrics \lyricsto "recorder" {
              \verseOne
            }

            \new Staff << \global \viola >>
          >>

          \layout { }
          \midi { }
        }


    \lyricsto "recorder" means: associate these lyrics with the voice
    named "recorder". You can create a voice with a name by using \new
    Voice = "recorder" { … some music … }. The question now is: should
    \global be in the same voice like \recorder? If yes,

    <<
      \new Staff \new Voice = "recorder" << \global \recorder >>
      \new Lyrics \lyricsto "recorder" \verseOne
    >>

    – if no, the same with:
    \new Staff <<
      \new Voice \global
      \new Voice = "recorder" \recorder
    >>


    HTH, Simon




--
ॐ नमः शिवाय




--
ॐ नमः शिवाय

reply via email to

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