Update .ly files.
[lilypond.git] / input / new / marking-notes-of-spoken-parts-with-a-cross-on-the-stem.ly
blob184bd48e3bb69f47ed3428442d52e473e8e87c5f
1 \version "2.12.0"
3 \header {
4 lsrtags = "editorial-annotations, vocal-music"
6 texidoc = "
7 This example shows how to put crosses on stems. Mark the beginning
8 of a spoken section with the @code{\\speakOn} keyword, and end it
9 with the @code{\\speakOff} keyword. Remember to end cross sections
10 before entering any rest: this function also adds crosses to the
11 invisible stems of rests.
13 doctitle = "Marking notes of spoken parts with a cross on the stem"
16 speakOn = {
17 \override Stem #'stencil = #(lambda (grob)
18 (ly:stencil-combine-at-edge
19 (ly:stem::print grob)
21 (- (ly:grob-property grob 'direction))
22 (grob-interpret-markup grob
23 (markup #:hspace -1.025 #:fontsize -4
24 #:musicglyph "noteheads.s2cross"))
25 -2.3 0))
28 speakOff = {
29 \revert Stem #'stencil
32 \score {
33 \new Staff {
34 \relative c'' {
35 a4 b a c
36 \speakOn
37 g4 f r g
38 b4 r d e
39 \speakOff
40 c4 a g f