lilypond-user
[Top][All Lists]
Advanced

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

Re: Context creation


From: Trevor Daniels
Subject: Re: Context creation
Date: Tue, 3 Jun 2008 10:19:28 +0100


Kieren MacMillan wrote
Hi Jesse,

If \context allegedly allows one to add notes to an existing context,
why does the following example not do so?

\version "2.10.33"

\new Staff = "mycontext" \relative c' { c4 d e f g2. }

\context Staff = "mycontext" \relative c' { g'4 g f e d c1 }

Because you have asked (implicitly) for two different Staff contexts. =)

What you want is to force the two musics to be *consecutive* rather than *concurrent*:

{ \new Staff = "mycontext" \relative c' { c4 d e f g2. } \context Staff = "mycontext" \relative c' { g'4 g f e d c1 } }

... and if you add an explicit \score you will need an extra set of
braces - one set to delimit the single compound music expression
which is required by the score block, and one set to make the
two statements consecutive.  This can be really puzzling!  (The inner
set is shorthand for \sequential { ... }, a command which is never required to be stated explicitly.}

\score {
{ \new Staff = "mycontext" \relative c' { c4 d e f g2. } \context Staff = "mycontext" \relative c' { g'4 g f e d c1 }
 }
}

Hope this helps!
Kieren.

Trevor


_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user





reply via email to

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