[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: where to roll in "global" values
From: |
Mats Bengtsson |
Subject: |
Re: where to roll in "global" values |
Date: |
Tue, 09 Dec 2003 14:03:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 |
There's no general answer, it depends on what you put in the
definition of global.
A \time directive will set the time signature for the full score
by default (since the Timing_engraver is part of the Score context).
Similarly, a \bar directive will apply to all staves of a score
(again because of the Timing_engraver) and the same goes for \break
(which is taken care of in the Score_engraver).
On the other hand, a \key directive only applies to the current Staff
context, so it has to be included in every stave separately. Similarly,
if you want to add a fermata on the last note of each stave, it has to
be done in every stave.
The easiest is probably to try and see what happens if you are uncertain
about what LilyPond will do. The systematic way is to look at the
definition of the different contexts at
http://lilypond.org/doc/v2.0/Documentation/user/out-www/lilypond-internals/Contexts.html#Contexts
even though it may be hard to know what engraver takes care of what
command.
/Mats
Kieren Richard MacMillan wrote:
[ Mac OS X 10.2.8; Lilypond 2.0.1 ]
Hello, all --
Just need some clarification here...
If I've got some "global" values (key and time signatures, \break
indications, etc.), do I have to include them in every context, or only
the GrandStaff? e.g. Given the following [pseudo-code] definitions:
global = \notes { \time 4/4 s4*4 \time 6/8 s8*6 }
mel = \notes { a2 b | b4. c }
rhNotes = \notes { a2 g | f4. e }
lhNotes = \notes { c2 c | g,4. c }
pedMarks = \notes { s1\sustainDown | s2.\sustainUp }
What is the difference between the following two score blocks? Or is one
of them incorrect entirely (i.e. syntactically)?
score
{
\context GrandStaff
<<
\global
\context Staff = melody { \mel }
\context PianoStaff
<<
\context Staff = upper { \rhNotes }
\context Staff = lower { \lhNotes }
>>
\context Dynamics = pianoPed { \pedMarks }
>>
}
score
{
\context GrandStaff
<<
\context Staff = melody { << \global \mel >> }
\context PianoStaff
<<
\context Staff = upper { << \global \rhNotes >> }
\context Staff = lower { << \global \lhNotes >> }
>>
\context Dynamics = pianoPed { << \global \pedMarks >> }
>>
}
Thanks!
Kieren.
_______________________________________________
Lilypond-user mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/lilypond-user
--
=============================================
Mats Bengtsson
Signal Processing
Signals, Sensors and Systems
Royal Institute of Technology
SE-100 44 STOCKHOLM
Sweden
Phone: (+46) 8 790 8463
Fax: (+46) 8 790 7260
Email: address@hidden
WWW: http://www.s3.kth.se/~mabe
=============================================