]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/using-postscript-to-generate-special-note-head-shapes.ly
Merge master into nested-bookparts
[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.11.62"
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 parallelogram =
17   #(ly:make-stencil (list 'embedded-ps
18     "gsave
19       currentpoint translate
20       newpath
21       0 0.25 moveto
22       1.3125 0.75 lineto
23       1.3125 -0.25 lineto
24       0 -0.75 lineto
25       closepath
26       fill
27       grestore" )
28     (cons 0 1.3125)
29     (cons 0 0))
30
31 myNoteHeads = \override NoteHead #'stencil = \parallelogram
32 normalNoteHeads = \revert NoteHead #'stencil
33
34 \relative c'' {
35   \myNoteHeads
36   g4 d'
37   \normalNoteHeads
38   <f, \tweak #'stencil \parallelogram b e>4 d
39 }
40