]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/using-postscript-to-generate-special-note-head-shapes.ly
Merge commit 'origin' into includes
[lilypond.git] / input / lsr / using-postscript-to-generate-special-note-head-shapes.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.12.0"
4
5 \header {
6   lsrtags = "editorial-annotations, tweaks-and-overrides"
7
8   texidoc = "
9 When a note head with a special shape cannot easily be generated with
10 graphic markup, PostScript code can be used to generate the shape. 
11 This example shows how a parallelogram-shaped note head is generated. 
12
13 "
14   doctitle = "Using PostScript to generate special note head shapes"
15 } % begin verbatim
16
17 parallelogram =
18   #(ly:make-stencil (list 'embedded-ps
19     "gsave
20       currentpoint translate
21       newpath
22       0 0.25 moveto
23       1.3125 0.75 lineto
24       1.3125 -0.25 lineto
25       0 -0.75 lineto
26       closepath
27       fill
28       grestore" )
29     (cons 0 1.3125)
30     (cons 0 0))
31
32 myNoteHeads = \override NoteHead #'stencil = \parallelogram
33 normalNoteHeads = \revert NoteHead #'stencil
34
35 \relative c'' {
36   \myNoteHeads
37   g4 d'
38   \normalNoteHeads
39   <f, \tweak #'stencil \parallelogram b e>4 d
40 }
41