X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=Documentation%2Fsnippets%2Fflute-slap-notation.ly;h=0f1627b3242cac8ed3d167fe999eab14a9cd19f7;hb=d59856c2469b4b1e7f18a4ec9c5c0da4107f9de3;hp=44190e28b3cda0eb7299a16c51974e6bbfbda120;hpb=4e7e046d0842fe1de8ef906de402246f7ca33d0b;p=lilypond.git diff --git a/Documentation/snippets/flute-slap-notation.ly b/Documentation/snippets/flute-slap-notation.ly index 44190e28b3..0f1627b324 100644 --- a/Documentation/snippets/flute-slap-notation.ly +++ b/Documentation/snippets/flute-slap-notation.ly @@ -1,10 +1,14 @@ -%% 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.29" +% DO NOT EDIT this file manually; it is automatically +% generated from Documentation/snippets/new +% Make any changes in Documentation/snippets/new/ +% and then run scripts/auxiliar/makelsr.py +% +% This file is in the public domain. +%% Note: this file works from version 2.19.22 +\version "2.19.22" \header { - lsrtags = "winds" + lsrtags = "contemporary-notation, winds" texidoc = " It is possible to indicate special articulation techniques such as a @@ -16,22 +20,27 @@ glyph. } % begin verbatim slap = -#(define-music-function (parser location music) (ly:music?) +#(define-music-function (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)))) - $music - \revert NoteHead #'stencil - \revert NoteHead #'stem-attachment + \temporary \override NoteHead.stencil = + #(lambda (grob) + (grob-interpret-markup grob + (markup #:musicglyph "scripts.sforzato"))) + \temporary \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 #}) \relative c' { - c4 \slap c d r \slap { g a } b r + c4 \slap c d r + \slap { g4 a } b r } -