LSR: Update.
[lilypond.git] / input / lsr / using-postscript-to-generate-special-note-head-shapes.ly
blob8cfc3b9f32293206795be0833d6edbe1d81faae4
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.66"
5 \header {
6 lsrtags = "editorial-annotations, tweaks-and-overrides"
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.
14 doctitle = "Using PostScript to generate special note head shapes"
15 } % begin verbatim
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))
32 myNoteHeads = \override NoteHead #'stencil = \parallelogram
33 normalNoteHeads = \revert NoteHead #'stencil
35 \relative c'' {
36 \myNoteHeads
37 g4 d'
38 \normalNoteHeads
39 <f, \tweak #'stencil \parallelogram b e>4 d