lilypond-user
[Top][All Lists]
Advanced

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

Re: Staffgroup question


From: Mats Bengtsson
Subject: Re: Staffgroup question
Date: Tue, 11 Nov 2003 10:50:36 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007



Jeffery B. Rancier wrote:
Hi All.

I've been fiddling with the satb.ly template, trying to create a
barbershop quartet template.  My question: Why can I get away with
specifying the time signature once in the first staff, and have it
default to the same in the lower staff, but not have the key signature
behave the same way.  It may seem a silly question, but I never played
anything that has diffent keys in a connected staff.  As such:

If you ever play a piece together with a transposing instrument,
such as a clarinet or trumpet, you will understand.


[...]

\score { \notes
         \context StaffGroup <<
             \property Score.automaticMelismata = ##t
             \context Lyrics = tenorLyrs {  }
             \context Staff = treble { \key ef \major \time 2/2 }
             \context Lyrics = leadLyrs {  }
             \context Lyrics = bariLyrs {  }
             \context Staff = bass {\clef bass \key ef \major }
             \context Lyrics = bassLyrs {  }

             \addlyrics
             \context Staff = treble \context Voice = VA { \voiceOne 
\tenorMusic }
             \context Lyrics = tenorLyrs { \tenorWords}
             \addlyrics
             \context Staff = treble \context Voice = VB { \voiceTwo \leadMusic 
}
             \context Lyrics = leadLyrs { \leadWords}
             \addlyrics
             \context Staff = bass \context Voice = VA { \voiceOne \bariMusic }
             \context Lyrics = bariLyrs { \bariWords}
             \addlyrics
             \context Staff = bass  \context Voice = VB { \voiceTwo \bassMusic }
             \context Lyrics = bassLyrs { \bassWords}
         >>

[...]

And secondly, is that the correct place(s) to put the \key & \time
keywords?  Thirdly, the original template defined:

It doesn't really matter where you put it as long as the Staff
context where you put the declarations keeps "alive" (see below)
until the actual music appears.


,----
|            \context Lyrics = tenorLyrs {  }
`----

as

,----
|            \context Lyrics = tenorLyrs { s1 }
`----

First of all, the reason for the context declarations at the top is
to get them in the correct order, i.e. to have the tenorLyrs printed
on top of the treble stave. When you create a context, it will stay
alive as long as there is some music or lyrics in it, then it will be
removed. If you then at a later stage of the score create a context
with the same name you will get a new context which does not have the
same placement, key signature and other property settings.
Therefore, the spacing note 's1' is just a trick to make sure that the
context is kept alive long enough for the real music to start.
If you, for example, have lyrics in the tenor part that begins at
bar 15, you would have to say 's1*15' to make sure that the context
stays alive.


What's the significance of that term? And finally, is there a
hierarchical diagram of which contexts are valid where?  Or perhaps an
EBNF?  I've been kinda randomly trying spots (and yes, I did read).

Go to lilypond.org -> Documentation -> Program reference -> Translation
-> Contexts. There, you can navigate through the context hierarchy.
For example, starting at 'Score', you can see that it may contain
the context types: FiguredBass, NoteNames, PianoStaff, ChoirStaff,
GrandStaff, ChordNames, Lyrics, RhythmicStaff, StaffGroup,
StaffContainer, GregorianTranscriptionStaff, VaticanaStaff, TabStaff
and Staff.

   /Mats





reply via email to

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