]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/flute-slap-notation.ly
LSR updates from tarball
[lilypond.git] / Documentation / snippets / flute-slap-notation.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.dsi.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.14.2"
8
9 \header {
10   lsrtags = "contemporary-notation, winds"
11
12 %% Translation of GIT committish: 30339cb3706f6399c84607426988b25f79b4998c
13   texidocfr = "
14 L'indication d'une technique particulière d'articulation, telle le
15 @qq{coup de langue} des flûtistes, en remplaçant la tête de note par un
16 glyphe approprié.
17
18 "
19   doctitlefr = "Coup de langue à la flûte"
20
21   texidoc = "
22 It is possible to indicate special articulation techniques such as a
23 flute @qq{tongue slap} by replacing the note head with the appropriate
24 glyph.
25
26 "
27   doctitle = "Flute slap notation"
28 } % begin verbatim
29
30
31 slap =
32 #(define-music-function (parser location music) (ly:music?)
33 #{
34   \override NoteHead #'stencil =
35   #(lambda (grob)
36      (grob-interpret-markup grob
37       (markup #:musicglyph "scripts.sforzato")))
38   \override NoteHead #'stem-attachment =
39   #(lambda (grob)
40      (let* ((thickness (ly:staff-symbol-line-thickness grob))
41             (stem (ly:grob-object grob 'stem))
42             (dir (ly:grob-property stem 'direction UP)))
43        (cons 1 (+ (if (= dir DOWN)
44                       0.5
45                       0)
46                   (/ thickness 2)))))
47   $music
48   \revert NoteHead #'stencil
49   \revert NoteHead #'stem-attachment
50 #})
51
52 \relative c' {
53   c4 \slap c d r
54   \slap { g4 a } b r
55 }
56