]> git.donarmstrong.com Git - lilypond.git/blob - input/test/add-staccato.ly
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / input / test / add-staccato.ly
1
2 \version "2.7.39"
3
4 \header {
5
6 texidoc= "@cindex Add Stacato
7 Using @code{make-music}, you can add various stuff to notes. In this
8 example staccato dots are added to the notes."
9
10
11 #(define (make-script x)
12    (make-music 'ArticulationEvent
13                'articulation-type x))
14     
15 #(define (add-script m x)
16    (if
17      (equal? (ly:music-property m 'name) 'EventChord)
18      (set! (ly:music-property m 'elements)
19            (cons (make-script x)
20                  (ly:music-property m 'elements))))
21    m)
22
23 #(define (add-staccato m)
24    (add-script m "staccato"))
25
26 \score {
27   \relative c'' {
28     a b \applyMusic #(lambda (x) (music-map add-staccato x)) { c c } 
29   }
30   \layout{ ragged-right = ##t }
31 }
32
33