LSR: Update.
[lilypond.git] / input / lsr / marking-notes-of-spoken-parts-with-a-cross-on-the-stem.ly
blob8002e477d626177251d6ab312af6dcd362140545
1 %% Do not edit this file; it is auto-generated from input/new
2 %% This file is in the public domain.
3 \version "2.11.62"
5 \header {
6 lsrtags = "editorial-annotations, vocal-music"
8 texidoc = "
9 This example shows how to put crosses on stems. Mark the beginning
10 of a spoken section with the @code{\\speakOn} keyword, and end it
11 with the @code{\\speakOff} keyword. Remember to end cross sections
12 before entering any rest: this function also adds crosses to the
13 invisible stems of rests.
15 doctitle = "Marking notes of spoken parts with a cross on the stem"
16 } % begin verbatim
18 speakOn = {
19 \override Stem #'stencil = #(lambda (grob)
20 (ly:stencil-combine-at-edge
21 (ly:stem::print grob)
23 (- (ly:grob-property grob 'direction))
24 (grob-interpret-markup grob
25 (markup #:hspace -1.025 #:fontsize -4
26 #:musicglyph "noteheads.s2cross"))
27 -2.3 0))
30 speakOff = {
31 \revert Stem #'stencil
34 \score {
35 \new Staff {
36 \relative c'' {
37 a4 b a c
38 \speakOn
39 g4 f r g
40 b4 r d e
41 \speakOff
42 c4 a g f