X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=input%2Ftest%2Fadd-text-script.ly;h=12a0604cb3fabbbd9a1fd3bcb8ea52a843018605;hb=56f77a28d7c1d9723899f90889016ce4978d890c;hp=d964ed7cf8dca4e4c89b879d307dbb790a46cf58;hpb=eba82770802a246bca4afab7eab1f78e84785214;p=lilypond.git diff --git a/input/test/add-text-script.ly b/input/test/add-text-script.ly index d964ed7cf8..12a0604cb3 100644 --- a/input/test/add-text-script.ly +++ b/input/test/add-text-script.ly @@ -1,37 +1,35 @@ -\version "2.1.26" +\version "2.7.39" \header { texidoc= "@cindex make-music Fingering -You can add various stuff to notes using make-music. -Here is an example of how to add an extra 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 display of the music you want to -create, then write a function that will build the structure for you. +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. " } #(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 } }