]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.139
authorfred <fred>
Wed, 27 Mar 2002 00:58:04 +0000 (00:58 +0000)
committerfred <fred>
Wed, 27 Mar 2002 00:58:04 +0000 (00:58 +0000)
VERSION
input/tricks/add-text-script.ly [new file with mode: 0644]

diff --git a/VERSION b/VERSION
index 90f434aee473e905f254658a3c679a559d5d0858..86d05cc9ddffa7118641c7c386d2c1c9d7d4c079 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1,7 +1,7 @@
 PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
-PATCH_LEVEL=138
+PATCH_LEVEL=139
 MY_PATCH_LEVEL=
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
diff --git a/input/tricks/add-text-script.ly b/input/tricks/add-text-script.ly
new file mode 100644 (file)
index 0000000..43ef4c6
--- /dev/null
@@ -0,0 +1,35 @@
+\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.";
+} 
+
+#(define (make-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
+     ))
+     
+#(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
+)
+
+\score {  \apply #(lambda (x) (add-script x "6") (display x) x ) \notes { c4-3 } }
+