]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/test/add-text-script.ly
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / input / test / add-text-script.ly
index 4df05478a4fdf03d865c4d00819f2326ca2bc189..12a0604cb3fabbbd9a1fd3bcb8ea52a843018605 100644 (file)
@@ -1,4 +1,4 @@
-\version "2.1.26"
+\version "2.7.39"
 
 \header {
 texidoc= "@cindex make-music Fingering
@@ -11,27 +11,25 @@ create, then write a function that will structure the music for you.
 } 
 
 #(define (make-text-script x) 
-   (let ((m (make-music-by-name 'TextScriptEvent)))
-    (ly:music-set-property! m 'direction DOWN) 
-     (ly:music-set-property! m 'text (make-simple-markup x))
-     m))
+   (make-music 'TextScriptEvent
+               'direction DOWN
+               'text (make-simple-markup x)))
      
 #(define (add-text-script m x)
    (if (equal? (ly:music-property m 'name) 'EventChord)
-       (ly:music-set-property! m 'elements
-                           (cons (make-text-script x)
-                                 (ly:music-property m 'elements)))
-       
+       (set! (ly:music-property m 'elements)
+             (cons (make-text-script x)
+                  (ly:music-property m 'elements)))       
        (let ((es (ly:music-property m 'elements))
-            (e (ly:music-property m 'element)) )
+            (e (ly:music-property m 'element)))
         (map (lambda (y) (add-text-script y x)) es)
         (if (ly:music? e)
             (add-text-script e x))))
    m)
 
 \score {
-  \apply #(lambda (x)  (add-text-script x "6") (display-music x) x ) \notes { c'4-3 }
-       \paper{ raggedright = ##t }
+  \applyMusic #(lambda (x)  (add-text-script x "6") (display-music x) x )  { c'4-3 }
+       \layout{ ragged-right = ##t }
 }