release commit
[lilypond.git] / input / test / add-staccato.ly
blob427a48464ea54f250441d9117b005b8e73e739e5
1 \version "1.5.68"
2 \header {
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."
8 }
10 #(define (make-script x)
11 (let ((m (ly-make-music "Articulation_req")))
12 (ly-set-mus-property! m 'articulation-type x)
13 m))
15 #(define (add-script m x)
16 (if (equal? (ly-music-name m) "Request_chord")
17 (ly-set-mus-property! m 'elements
18 (cons (make-script x)
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)
24 (if (music? e)
25 (add-script e x))))
28 #(define (add-staccato m)
29 (add-script m "staccato"))
31 \score {
32 \notes\relative c'' {
33 a b \apply #add-staccato { c c }
34 a b \apply #add-staccato { c c }