There's no need for the \new Score in this situation. You can just as
well do the setting
in the \layout block:
\score {
<<
\new Staff { c''1 \mark "molto" c'' }
\new Staff { c'1 \mark "molto" c' }
>>
\layout{
\context {
\Score
\remove "Mark_engraver"
\remove "Staff_collecting_engraver"
}
\context {
\Staff
\consists "Mark_engraver"
\consists "Staff_collecting_engraver"
}
}
\header {
piece = "a Score within a \score!"
}
}
Here, I also moved the redefinition of the Staff contexts into the
\layout block, which is not necessary
but saves some typing in this particular example, since all the Staff
contexts should have the same
definition.
In general, I cannot think of any situation where \new Score is really
needed. I searched a bit
in the mailing list archives, and found one early mention of this
feature in
http://lists.gnu.org/archive/html/lilypond-devel/2004-02/msg00098.html
From there, it seems that the main reason to allow for \new Score was
for symmetry with
all other contexts, like Staff and Voice, where you can tweak the
context using \new Xxxx \with ...
/Mats
Mark Polesky wrote:
Valentin Villenave wrote:
A \score block may include its own \header or a \layout block, whereas
\new Score won't allow you to do so.
\score does not automatically create contexts (whereas \new Score
does) ; therefore you have to create one inside it.
Let me get this straight. If I wanted a score-specific header, AND if I wanted
"text marks" on every staff (as in the snippet "Printing marks on every staff":
http://lilypond.org/doc/v2.11/Documentation/user/lilypond/Writing-text#Selected-Snippets-35
), I would have to nest a "\new Score { ... }" block (needed to reassign the
engravers) within a "\score" block (needed to get the score-specific header)?
This is not only confusing, but seems needlessly tedious. I agree with Helge;
either we need something in the docs like "When to use \score and when to use
\new Score", or we need some new syntactic sugar. Can "\score" be re-coded to
incorporate the auto-context-creation of "\new Score", or can "\new Score" be
re-coded to allow \header and \layout blocks? Or am I missing something...
Okay, if there's a way to code the example below without
\score { \new Score { ... } }
please let me know.
- Mark
_____________________________________________
\score {
\new Score \with {
\remove "Mark_engraver"
\remove "Staff_collecting_engraver"
}
<<
\new Staff \with {
\consists "Mark_engraver"
\consists "Staff_collecting_engraver"
}
{ c''1 \mark "molto" c'' }
\new Staff \with {
\consists "Mark_engraver"
\consists "Staff_collecting_engraver"
}
{ c'1 \mark "molto" c' }
>>
\header {
piece = "a Score within a \score!"
}
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user