X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=input%2Ftest%2Fadd-text-script.ly;h=12a0604cb3fabbbd9a1fd3bcb8ea52a843018605;hb=9f3572d98bb948c9689cd1f75401a029451fa001;hp=6d66b21fe73d9f19d9e9e83725f1b0c400138810;hpb=04265f11d1f21416ccebd2dcaa1d903dc781b36e;p=lilypond.git diff --git a/input/test/add-text-script.ly b/input/test/add-text-script.ly index 6d66b21fe7..12a0604cb3 100644 --- a/input/test/add-text-script.ly +++ b/input/test/add-text-script.ly @@ -1,10 +1,12 @@ -\version "2.9.7" -\sourcefilename "add-text-script.ly" +\version "2.7.39" \header { texidoc= "@cindex make-music Fingering You can add various stuff to notes using @code{make-music}. In this example, an extra fingering is attached to a note. + +In general, first do a @code{display} of the music you want to +create, then write a function that will structure the music for you. " } @@ -12,7 +14,7 @@ In this example, an extra fingering is attached to a note. (make-music 'TextScriptEvent 'direction DOWN 'text (make-simple-markup x))) - + #(define (add-text-script m x) (if (equal? (ly:music-property m 'name) 'EventChord) (set! (ly:music-property m 'elements) @@ -25,14 +27,9 @@ In this example, an extra fingering is attached to a note. (add-text-script e x)))) m) -addScript = -#(define-music-function (parser location script music ) - ( string? ly:music? ) - (add-text-script music script)) - \score { - { - \addScript "6" { c'4-3 } - } + \applyMusic #(lambda (x) (add-text-script x "6") (display-music x) x ) { c'4-3 } + \layout{ ragged-right = ##t } } +