]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/flute-slap-notation.ly
Use object callbacks for pure-height caching.
[lilypond.git] / Documentation / snippets / flute-slap-notation.ly
index 3669ca46b46a28a35d941c3bbb62445ce6971ae9..9fd9d70d5bca807c24e34162b8224270e94e8437 100644 (file)
@@ -1,13 +1,14 @@
-%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% Do not edit this file; it is automatically
+%% generated from LSR http://lsr.dsi.unimi.it
 %% This file is in the public domain.
-\version "2.13.1"
+\version "2.13.20"
 
 \header {
   lsrtags = "winds"
 
   texidoc = "
 It is possible to indicate special articulation techniques such as a
-flute's \"tongue slap\" by replacing the note head with the appropriate
+flute @qq{tongue slap} by replacing the note head with the appropriate
 glyph.
 
 "
@@ -17,13 +18,17 @@ glyph.
 slap =
 #(define-music-function (parser location music) (ly:music?)
 #{
-  \override NoteHead #'stencil = #(lambda (grob)
-    (grob-interpret-markup grob
-      (markup #:musicglyph "scripts.sforzato")))
-  \override NoteHead #'extra-offset = #'(0.1 . 0.0)
+  \override NoteHead #'stencil =
+    #(lambda (grob)
+       (grob-interpret-markup grob
+        (markup #:musicglyph "scripts.sforzato")))
+  \override NoteHead #'stem-attachment =
+    #(lambda (grob)
+       (let ((thickness (ly:staff-symbol-line-thickness grob)))
+         (cons 1 (/ thickness 2))))
   $music
   \revert NoteHead #'stencil
-  \revert NoteHead #'extra-offset
+  \revert NoteHead #'stem-attachment
 #})
 
 \relative c' {