Massive changes - see ChangeLog.
[lilypond.git] / input / test / add-staccato.ly
blobbba8876a3d064be29b637fb440b477c27dbce6cb
1 #(ly:set-option 'old-relative)
2 \version "1.9.0"
4 \header {
6 texidoc= "@cindex Add Stacato
7 Using make-music, you can add various stuff to notes. Here
8 is an example how to add staccato dots. Note: for this simple case
9 one would not use scm constructs. See separate-staccato.ly first.
13 #(define (make-script x)
14 (let ((m (make-music-by-name 'ArticulationEvent)))
15 (ly:set-mus-property! m 'articulation-type x)
16 m))
18 #(define (add-script m x)
19 (if
20 (equal? (ly:get-mus-property m 'name) 'EventChord)
21 (ly:set-mus-property! m 'elements
22 (cons (make-script x)
23 (ly:get-mus-property m 'elements))))
26 #(define (add-staccato m)
27 (add-script m "staccato"))
29 \score {
30 \notes\relative c'' {
31 a b \apply #(lambda (x) (music-map add-staccato x)) { c c }
33 \paper{ raggedright = ##t }