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