]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/add-text-script.ly
* lily/beam.cc (set_stem_lengths): extend stems for gapped tremolo
[lilypond.git] / input / test / add-text-script.ly
index 43ef4c68451bf5b87fb65f647afad87e3cf4d73b..0e79aac6dfe6ca83eb043ba65ae21e3bd98b53ef 100644 (file)
@@ -1,35 +1,33 @@
+\version "1.5.68"
 \header {
 texidoc= "Using make-music, you can add
 various stuff to notes. Here is an example
 how to add an extra fingering. 
 
 In general, first do a display of the music you want ot
-create, then write a function that will build the structure for you.";
+create, then write a function that will build the structure for you."
 } 
 
-#(define (make-script x) 
-     (let* (  (m (ly-make-music "Text_script_req"))
-     )
+#(define (make-text-script x) 
+   (let ((m (ly-make-music "Text_script_req")))
+     (ly-set-mus-property! m 'text-type 'finger)
+     (ly-set-mus-property! m 'text x)
+     m))
      
-     (ly-set-mus-property m 'text-type 'finger)
-     (ly-set-mus-property m 'text x)
-     m
-     ))
-     
-#(define (add-script m x)
-  (if (equal? (ly-music-name m) "Request_chord")
-    (ly-set-mus-property m 'elements
-      (cons (make-script x) (ly-get-mus-property m 'elements)))
-
-    (let* ( (es (ly-get-mus-property m 'elements))
-            (e (ly-get-mus-property m 'element)) )
-     (map (lambda (y) (add-script y x)) es)
-     (if (music? e)
-       (add-script e x))
-    )
-  )
-  m
-)
+#(define (add-text-script m x)
+   (if (equal? (ly-music-name m) "Request_chord")
+       (ly-set-mus-property! m 'elements
+                           (cons (make-text-script x)
+                                 (ly-get-mus-property m 'elements)))
+       
+       (let ((es (ly-get-mus-property m 'elements))
+            (e (ly-get-mus-property m 'element)) )
+        (map (lambda (y) (add-text-script y x)) es)
+        (if (music? e)
+            (add-text-script e x))))
+   m)
 
-\score {  \apply #(lambda (x) (add-script x "6") (display x) x ) \notes { c4-3 } }
+\score {
+  \apply #(lambda (x) (add-script x "6") (display x) x ) \notes { c4-3 }
+}