X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fflute-slap-notation.ly;h=1ccc3f15f6e049c863c8f1a3a5c3fc3c62e87f04;hb=de179d8b2cbf6fe86ff9a000a0d21bc6bc118905;hp=fc17f32d86c92838f1ba8d5639a8e0f16166fa89;hpb=579274a935b22567ac15b3651a9d651474f88ec4;p=lilypond.git diff --git a/Documentation/snippets/flute-slap-notation.ly b/Documentation/snippets/flute-slap-notation.ly index fc17f32d86..1ccc3f15f6 100644 --- a/Documentation/snippets/flute-slap-notation.ly +++ b/Documentation/snippets/flute-slap-notation.ly @@ -1,10 +1,13 @@ -%% Do not edit this file; it is automatically +%% DO NOT EDIT this file manually; it is automatically %% generated from LSR http://lsr.dsi.unimi.it +%% Make any changes in LSR itself, or in Documentation/snippets/new/ , +%% and then run scripts/auxiliar/makelsr.py +%% %% This file is in the public domain. -\version "2.13.16" +\version "2.17.20" \header { - lsrtags = "winds" + lsrtags = "contemporary-notation, winds" texidoc = " It is possible to indicate special articulation techniques such as a @@ -15,23 +18,29 @@ glyph. doctitle = "Flute slap notation" } % begin verbatim + slap = #(define-music-function (parser location music) (ly:music?) #{ - \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)))) + \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)) + (stem (ly:grob-object grob 'stem)) + (dir (ly:grob-property stem 'direction UP))) + (cons 1 (+ (if (= dir DOWN) + 0.5 + 0) + (/ thickness 2))))) $music - \revert NoteHead #'stencil - \revert NoteHead #'stem-attachment + \revert NoteHead.stencil + \revert NoteHead.stem-attachment #}) \relative c' { - c4 \slap c d r \slap { g a } b r + c4 \slap c d r + \slap { g4 a } b r } -