LilyPond Beginnershandleiding
LilyPond Beginnershandleiding
LilyPond Beginnershandleiding
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
Hoofdstuk 4: Tweaking output 92<br />
<br />
<br />
Red<br />
Black<br />
<br />
Green<br />
Note that the \tweak command must be preceded by an articulation mark since the tweaked<br />
expression needs to be applied as an articulation itself. In case of multiple direction overrides (^<br />
or _), the leftmost override wins since it is applied last.<br />
Objects such as stems and accidentals are created later, and not directly from the following<br />
event. It is still possible to use \tweak on such indirectly created objects by explicitly naming<br />
the layout object, provided that <strong>LilyPond</strong> can trace its origin back to the original event:<br />
<br />
<br />
<br />
<br />
<br />
<br />
This long form of the \tweak command can be described as<br />
\tweak layout-object.layout-property value<br />
The \tweak command must also be used to change the appearance of one of a set of nested<br />
tuplets which begin at the same musical moment. In the following example, the long tuplet<br />
bracket and the first of the three short brackets begin at the same musical moment, so any<br />
\override command would apply to both of them. In the example, \tweak is used to distinguish<br />
between them. The first \tweak command specifies that the long tuplet bracket is to be placed<br />
above the notes and the second one specifies that the tuplet number is to be printed in red on<br />
the first short tuplet bracket.<br />
\tweak direction #up<br />
\tuplet 3/4 {<br />
\tweak color #red<br />
\tuplet 3/2 { c8[ c c] }<br />
\tuplet 3/2 { c8[ c c] }<br />
\tuplet 3/2 { c8[ c c] }<br />
}<br />
3<br />
<br />
3<br />
<br />
<br />
3 3<br />
<br />
<br />
If nested tuplets do not begin at the same moment, their appearance may be modified in the<br />
usual way with \override commands:<br />
\tuplet 3/2 { c8[ c c] }<br />
\once \override TupletNumber.text = #tuplet-number::calc-fraction-text<br />
\tuplet 3/2 {<br />
c8[ c]<br />
c8[ c]<br />
\once \override TupletNumber.transparent = ##t<br />
\tuplet 3/2 { c8[ c c] }<br />
\tuplet 3/2 { c8[ c c] }<br />
}