-\version "2.1.28"
+\version "2.10.0"
+\sourcefilename "add-text-script.ly"
\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.
"
}
(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)
(add-text-script e x))))
m)
+addScript =
+#(define-music-function (parser location script music )
+ ( string? ly:music? )
+ (add-text-script music script))
+
\score {
- \apply #(lambda (x) (add-text-script x "6") (display-music x) x ) \notes { c'4-3 }
- \paper{ raggedright = ##t }
+ {
+ \addScript "6" { c'4-3 }
+ }
}
-