lilypond-user
[Top][All Lists]
Advanced

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

Re: Expert question on named contexts


From: Trevor Daniels
Subject: Re: Expert question on named contexts
Date: Fri, 8 Aug 2008 20:17:11 +0100


Valentin Villenave wrote
Mats Bengtsson wrote
Can anybody tell me exactly what happens with the context names in the
following example.

\relative c' <<
\new Staff \new Voice = myvoice { c d e f }
\new Staff \context Voice = myvoice { g f e d }


Is the Voice context in the
lower stave given some random unknown name?

I guess it is, since when you add lyrics they're aligned with the
first instanciation of "myvoice":

\relative c' <<
\new Staff \new Voice = myvoice { c d8 e f4 g8 f }
\new Staff \context Voice = myvoice { g8 f e d g4 f }
\new Lyrics \lyricsto "myvoice" \lyricmode { one two three four five six }


However, I do wonder how this context can be named internally...

My understanding is that the name given to a context is
stored internally as the context's id.  You can display this
with the ly:context-id function.  In the example above both
contexts have id set to "myvoice", as least that's what this
function returns.

I would guess that the lyrics attach to the first context
encountered which has a matching name.

Cheers,
Valentin

Trevor





reply via email to

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