1 \version "1.7.18" %% or actually: 1.7.1 ...
2 % FIXME: doesn't work with 1.7.19. Check with more recent version.
5 texidoc= "@cindex Add Stacato
6 Using make-music, you can add various stuff to notes. Here
7 is an example how to add staccato dots. Note: for this simple case
8 one would not use scm constructs. See separate-staccato.ly first.
12 #(define (make-script x)
13 (let ((m (make-music-by-name 'ArticulationEvent)))
14 (ly:set-mus-property! m 'articulation-type x)
17 #(define (add-script m x)
18 (if (equal? (ly:get-mus-property m 'name) 'RequestChord)
19 (ly:set-mus-property! m 'elements
21 (ly:get-mus-property m 'elements)))
23 (let ((es (ly:get-mus-property m 'elements))
24 (e (ly:get-mus-property m 'element)) )
25 (map (lambda (y) (add-script y x)) es)
30 #(define (add-staccato m)
31 (add-script m "staccato"))
35 a b \apply #add-staccato { c c }
36 a b \apply #add-staccato { c c }
38 \paper{ raggedright = ##t }