\version "2.21.80" % Liste des doigtés. Les hauteurs sont sous la forme % (A B) où A est la hauteur brute comptée à partir de % 0 pour do, et B représente l'altération sous forme % de fraction d'un ton (par exemple 1/2 pour un dièse % ou -1/4 pour un demi-bémol). tinWhistleFingerings = #'(((0 0) . (one two three four five six)) ((1 0) . (one two three four five)) ((2 0) . (one two three four)) ((3 0) . (one two three)) ((4 0) . (one two)) ((5 0) . (one)) ((6 0) . ()) ) tinWhistle = #(define-music-function (tone music) (ly:pitch? ly:music?) #{ << { $music } \new Dynamics { #(music-map (lambda (m) (if (music-is-of-type? m 'note-event) (let* ((base-pitch (ly:music-property m 'pitch)) (transposed-pitch (ly:pitch-transpose base-pitch (ly:pitch-negate tone)))) (make-music 'SkipEvent 'duration (ly:music-property m 'duration) 'articulations (list (make-music 'TextScriptEvent 'text #{ \markup \center-column { #(if (> (ly:pitch-octave base-pitch) 0) "+" #{ \markup \with-outline "+" \null #}) \vspace #0.2 \override #'(size . 0.5) \woodwind-diagram #'tin-whistle #(list (cons 'cc (assoc-get (list (ly:pitch-notename transposed-pitch) (ly:pitch-alteration transposed-pitch)) tinWhistleFingerings)) '(lh . ()) '(rh . ())) } #})))) m)) music) } >> #}) \tinWhistle c \relative { c'1 d e4 c g' b c1 d e4 c g' b } \tinWhistle g \transpose c g \relative { c'1 d e4 c g' b c1 d e4 c g' b }