1 \version "1.7.0" %% or actually: 1.7.1 ...
3 texidoc= "Using make-music, you can add
4 various stuff to notes. Here is an example
5 how to add an extra fingering.
7 In general, first do a display of the music you want ot
8 create, then write a function that will build the structure for you."
11 #(define (make-text-script x)
12 (let ((m (make-music-by-name 'TextScriptEvent)))
13 (ly-set-mus-property! m 'text-type 'finger)
14 (ly-set-mus-property! m 'text x)
17 #(define (add-text-script m x)
18 (if (equal? (ly-music-name m) 'RequestChord)
19 (ly-set-mus-property! m 'elements
20 (cons (make-text-script x)
21 (ly-get-mus-property m 'elements)))
23 (let ((es (ly-get-mus-property m 'elements))
24 (e (ly-get-mus-property m 'element)) )
25 (map (lambda (y) (add-text-script y x)) es)
27 (add-text-script e x))))
31 \apply #(lambda (x) (add-text-script x "6") (display x) x ) \notes { c4-3 }