]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/snap-pizzicato-markup-bartok-pizzicato.ly
Merge master into nested-bookparts
[lilypond.git] / input / lsr / snap-pizzicato-markup-bartok-pizzicato.ly
1 %% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
2 %% This file is in the public domain.
3 \version "2.11.62"
4
5 \header {
6   lsrtags = "expressive-marks, unfretted-strings"
7
8   texidoc = "
9 A snap-pizzicato (also known as \"Bartok pizzicato\") is a \"strong
10 pizzicato where the string is plucked vertically by snapping and
11 rebounds off the fingerboard of the instrument\" (Wikipedia). It is
12 denoted by a cicle with a vertical line going from the center upwards
13 outside the circle. While Lilypond does not have a pre-defined command
14 to created this markup, it is easy to create a definition and place it
15 directly into the lilypond file. 
16
17 "
18   doctitle = "Snap-pizzicato markup (\"Bartok pizzicato\")"
19 } % begin verbatim
20
21 % Definition of the snappizz markup to print snap-pizzicato articulations.
22 % These are also known as "Bartok pizzicato" and are denotes by a circle with a
23 % vertical line from the center of the circle upwards:
24 #(define-markup-command (snappizz layout props) ()
25   (interpret-markup layout props
26     (markup #:stencil
27       (ly:stencil-translate-axis
28         (ly:stencil-add
29           (make-circle-stencil 0.7 0.1 #f)
30           (ly:make-stencil
31             (list 'draw-line 0.1 0 0.1 0 1)
32             '(-0.1 . 0.1) '(0.1 . 1)
33           )
34         )
35         0.7 X
36       )
37     )
38   )
39 )
40 snappizzicato = \markup \snappizz
41
42 % now it can be used as \snappizzicato after the note/chord
43 % Note, that a direction (-, ^ or _) is REQUIRED!
44 \relative c'{
45    c4^\snappizzicato
46 %    < c e g>\snappizzicato  % This does NOT work
47    < c' e g>-\snappizzicato
48    < c' e g>^\snappizzicato
49    < c, e g>_\snappizzicato
50 }
51