lilypond-user
[Top][All Lists]
Advanced

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

Re: Scoring song with multiple sections


From: Malte Meyn
Subject: Re: Scoring song with multiple sections
Date: Sun, 1 May 2016 18:32:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0



Am 01.05.2016 um 17:29 schrieb Henry Law:
But on the second appearance of "<<" Lily barfs with "syntax error,
unexpected <<".

Every \score can contain only one music expression but you did something like

%%%%%
\version "2.18.2"
\score {
  <<
    \new Staff a
    \new Staff b
  >>
  <<
    f
    g
  >>
}
%%%%%

This is two music expressions, each in << >> so the second expression starting with << is unexpected.

There are two possibilities how to solve your problem:
1. Use only one << >> expression and put the music into {}:

%%%%%
\version "2.18.2"
\score {
  <<
    \new Staff { a f }
    \new Staff { b g }
  >>
}
%%%%%

2. Put the << >> << >> inside { } (so it’s one sequential music expression). Then you have to reuse the (named) staves using \context otherwise new staves will be created:

%%%%%
\version "2.18.2"
\score {
  {
    <<
      \new Staff = "first" a
      \new Staff = "second" b
    >>
    <<
      \context Staff = "first" f
      \context Staff = "second" g
    >>
  }
}
%%%%%

It’s the same for ChordNames and Lyrics (but you probably cannot use \addlyrics as a shortcut for \new Lyrics \lyricsto … because you have to name the Lyrics context).



reply via email to

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