\version "2.20.0" \header { title = "Andro" subtitle = "Tin Whistle en G" % tagline = "Partition élaborée avec Lilypond" } \paper { system-system-spacing.basic-distance = 20 % add space between composer/opus markup and first staff markup-system-spacing.padding = #8 % add a little space between composer and opus markup-markup-spacing.padding = #1.2 top-margin = #8 bottom-margin = #12 } % 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). (from : Jean A.S) 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)) ((5 1/2) . (two three)) ((6 -1/2) . (two three)) ((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) } >> #}) tin = \tinWhistle g \relative c' { \time 4/4 \clef "treble_8" \key a \minor \repeat volta 2 { a4 a4 a4. b8 c8[ d] c b a4 c8 a b4 b b4. d8 c4 b4 a2 } \break \repeat volta 2 { e'4 e e d8 c d4 d d2 c4 c c b8 a b4 b4 b2 e4 e8 d b4. d8 c4 b a2 } } \score { \context Voice \tin \layout { } \midi {} }