1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
6 %% This file is in the public domain.
10 lsrtags = "scheme-language"
13 You can add various stuff to notes using @code{make-music}. In this
14 example, an extra fingering is attached to a note.
17 In general, first do a @code{display} of the music you want to create,
18 then write a function that will structure the music for you.
23 doctitle = "Adding extra fingering with scheme"
27 #(define (make-text-script x)
28 (make-music 'TextScriptEvent
30 'text (make-simple-markup x)))
32 #(define (add-text-script m x)
33 (if (equal? (ly:music-property m 'name) 'EventChord)
34 (set! (ly:music-property m 'elements)
35 (cons (make-text-script x)
36 (ly:music-property m 'elements)))
37 (let ((es (ly:music-property m 'elements))
38 (e (ly:music-property m 'element)))
39 (map (lambda (y) (add-text-script y x)) es)
41 (add-text-script e x))))
45 #(define-music-function (parser location script music )
47 (add-text-script music script))
51 \addScript "6" { c'4-3 }