-#(ly:set-option 'old-relative)
-\version "1.9.1"
+
+\version "2.6.0"
\header {
texidoc= "@cindex Add Stacato
-Using make-music, you can add various stuff to notes. Here
-is an example how to add staccato dots. Note: for this simple case
-one would not use scm constructs. See separate-staccato.ly first.
+Using @code{make-music}, you can add various stuff to notes. In this
+example staccato dots are added to the notes. For this simple case,
+it is not necessary to use scm constructs (see @code{separate-staccato.ly}).
"
}
#(define (make-script x)
- (let ((m (make-music-by-name 'ArticulationEvent)))
- (ly:set-mus-property! m 'articulation-type x)
- m))
+ (make-music 'ArticulationEvent
+ 'articulation-type x))
#(define (add-script m x)
(if
- (equal? (ly:get-mus-property m 'name) 'EventChord)
- (ly:set-mus-property! m 'elements
- (cons (make-script x)
- (ly:get-mus-property m 'elements))))
+ (equal? (ly:music-property m 'name) 'EventChord)
+ (set! (ly:music-property m 'elements)
+ (cons (make-script x)
+ (ly:music-property m 'elements))))
m)
#(define (add-staccato m)
(add-script m "staccato"))
\score {
- \notes\relative c'' {
- a b \apply #(lambda (x) (music-map add-staccato x)) { c c }
+ \relative c'' {
+ a b \applymusic #(lambda (x) (music-map add-staccato x)) { c c }
}
- \paper{ raggedright = ##t }
+ \layout{ raggedright = ##t }
}