From 3d0580f58d8738ea9459a4593b658a5467a49321 Mon Sep 17 00:00:00 2001 From: fred Date: Wed, 27 Mar 2002 00:58:04 +0000 Subject: [PATCH] lilypond-1.3.139 --- VERSION | 2 +- input/tricks/add-text-script.ly | 35 +++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 input/tricks/add-text-script.ly diff --git a/VERSION b/VERSION index 90f434aee4..86d05cc9dd 100644 --- 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 index 0000000000..43ef4c6845 --- /dev/null +++ b/input/tricks/add-text-script.ly @@ -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 } } + -- 2.39.5