Last active
May 11, 2018 05:45
-
-
Save suitougreentea/09e8c656d3d089e07ed79b6ded888bcc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% There is an exception to this general rule: inside of an {…} construct (sequential music), the construct’s notion of the “current context” will descend whenever an element of the sequence ends in a subcontext of the previous current context. This avoids spurious creation of implicit contexts in a number of situations but means that the first context descended into will be kept alive until the end of the expression. | |
% In contrast, the contexts of a <<…>> construct’s (simultaneous music) expression are not carried forth, so enclosing a context creating command in an extra pair of <<…>> will keep the context from persisting through all of the enclosing {…} sequence. | |
% - http://lilypond.org/doc/v2.19/Documentation/notation/keeping-contexts-alive.html | |
\version "2.19.81" | |
\score { | |
\new Staff { | |
\new Voice { | |
\override NoteHead.stencil = ##f | |
c'4 | |
} | |
d'4 % This NoteHead is also omitted | |
} | |
} | |
\score { | |
\new Staff { | |
\new Voice { | |
\override NoteHead.stencil = ##f | |
c'4 | |
} | |
\new Voice { | |
d'4 % This NoteHead is present | |
} | |
} | |
} | |
\score { | |
\new Staff { | |
<<\new Voice { | |
\override NoteHead.stencil = ##f | |
c'4 | |
}>> | |
d'4 % This NoteHead is present | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment