]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/add-staccato.ly
Merge with git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond.git
[lilypond.git] / input / test / add-staccato.ly
index aec219f6263a347d92b22145f0fad8c5dc225dd6..aee898561d4f13f077d34f87337b390384aae8a8 100644 (file)
@@ -1,19 +1,16 @@
-
-\version "2.3.4"
+\version "2.10.0"
+\sourcefilename "add-staccato.ly"
 
 \header {
-
 texidoc= "@cindex Add Stacato
 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}).
-"
+example staccato dots are added to the notes."
 } 
 
 #(define (make-script x)
    (make-music 'ArticulationEvent
                'articulation-type x))
-    
+
 #(define (add-script m x)
    (if
      (equal? (ly:music-property m 'name) 'EventChord)
@@ -25,11 +22,15 @@ it is not necessary to use scm constructs (see @code{separate-staccato.ly}).
 #(define (add-staccato m)
    (add-script m "staccato"))
 
+addStacc =
+#(define-music-function (parser location music) 
+                                       (ly:music?)
+               (music-map add-staccato music))    
+
 \score {
   \relative c'' {
-    a b \applymusic #(lambda (x) (music-map add-staccato x)) { c c } 
+    a b \addStacc { c c } 
   }
-  \paper{ raggedright = ##t }
+  \layout{ ragged-right = ##t }
 }
 
-