%% Generated by lilypond-book
%% Options: [exampleindent=10.16\mm,indent=0\mm,line-width=160\mm]
\include "lilypond-book-preamble.ly"


% ****************************************************************
% Start cut-&-pastable-section
% ****************************************************************



\paper {
  indent = 0\mm
  line-width = 160\mm
  % offset the left padding, also add 1mm as lilypond creates cropped
  % images with a little space on the right
  line-width = #(- line-width (* mm  3.000000) (* mm 1))
}

\layout {
  
}





% ****************************************************************
% ly snippet:
% ****************************************************************
\sourcefilename "snippets/flute-slap-notation.ly"
\sourcefileline 0
%% 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 {
%% Translation of GIT committish: f11513f36c131dab18338d6a3a729e24a927150d
  texidocja = "
@qq{スラップ タンギング} のような、特別なアーティキュレーション テクニックを@c
指示するために、符頭を別のグリフに置き換えることができます。
"
  doctitleja = "フルート スラップの記譜"

%% Translation of GIT committish: 90f1e587efc2159450530da3eb8fb391d156a1dc
  texidocfr = "
L'indication d'une technique particulière d'articulation, telle le
« coup de langue » des flûtistes, s'obtient en remplaçant la tête
de note par un glyphe approprié.

"
  doctitlefr = "Coup de langue à la flûte"

%% Translation of GIT committish: 0c00cd98e81b27325bed5891b950fe7f0f0ebe5d
  texidoces = "
Es posible indicar técnicas de articulación especiales como el golpe
de lengua de la flauta (@qq{tongue slap}) sustituyendo la cabeza de la
figura con el glifo adecuado.

"
  doctitlees = "Notación de los golpes de lengua de la flauta"

  lsrtags = "contemporary-notation, winds"

  texidoc = "
It is possible to indicate special articulation techniques such as a
flute @qq{tongue slap} by replacing the note head with the appropriate
glyph.

"
  doctitle = "Flute slap notation"
} % begin verbatim

slap =
#(define-music-function (music) (ly:music?)
#{
  \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 { g4 a } b r
}



% ****************************************************************
% end ly snippet
% ****************************************************************
