1 \version "1.7.3" %% or actually: 1.7.1 ...
4 texidoc= "Using make-music, you can add various stuff to notes. Here
5 is an example how to add staccato dots. Note: for this simple case
6 one would not use scm constructs. See separate-staccato.ly first."
10 #(define (make-script x)
11 (let ((m (make-music-by-name 'ArticulationEvent)))
12 (ly:set-mus-property! m 'articulation-type x)
15 #(define (add-script m x)
16 (if (equal? (ly:get-mus-property m 'name) 'RequestChord)
17 (ly:set-mus-property! m 'elements
19 (ly:get-mus-property m 'elements)))
21 (let ((es (ly:get-mus-property m 'elements))
22 (e (ly:get-mus-property m 'element)) )
23 (map (lambda (y) (add-script y x)) es)
28 #(define (add-staccato m)
29 (add-script m "staccato"))
33 a b \apply #add-staccato { c c }
34 a b \apply #add-staccato { c c }