lilypond-user
[Top][All Lists]
Advanced

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

where to roll in "global" values


From: Kieren Richard MacMillan
Subject: where to roll in "global" values
Date: Mon, 8 Dec 2003 20:25:18 -0500

[ 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.





reply via email to

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