OLD | NEW |
1 %% DO NOT EDIT this file manually; it is automatically | 1 %% DO NOT EDIT this file manually; it is automatically |
2 %% generated from LSR http://lsr.dsi.unimi.it | 2 %% generated from LSR http://lsr.dsi.unimi.it |
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ , | 3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ , |
4 %% and then run scripts/auxiliar/makelsr.py | 4 %% and then run scripts/auxiliar/makelsr.py |
5 %% | 5 %% |
6 %% This file is in the public domain. | 6 %% This file is in the public domain. |
7 \version "2.16.0" | 7 \version "2.17.6" |
8 | 8 |
9 \header { | 9 \header { |
10 lsrtags = "editorial-annotations, really-cool, scheme-language, tweaks-and-ove
rrides" | 10 lsrtags = "editorial-annotations, really-cool, scheme-language, tweaks-and-ove
rrides" |
11 | 11 |
12 texidoc = " | 12 texidoc = " |
13 When a note head with a special shape cannot easily be generated with | 13 When a note head with a special shape cannot easily be generated with |
14 graphic markup, PostScript code can be used to generate the shape. | 14 graphic markup, PostScript code can be used to generate the shape. |
15 This example shows how a parallelogram-shaped note head is generated. | 15 This example shows how a parallelogram-shaped note head is generated. |
16 | 16 |
17 " | 17 " |
18 doctitle = "Using PostScript to generate special note head shapes" | 18 doctitle = "Using PostScript to generate special note head shapes" |
19 } % begin verbatim | 19 } % begin verbatim |
20 | 20 |
21 | 21 |
22 parallelogram = | 22 parallelogram = |
23 #(ly:make-stencil (list 'embedded-ps | 23 #(ly:make-stencil (list 'embedded-ps |
24 "gsave | 24 "gsave |
25 currentpoint translate | 25 currentpoint translate |
26 newpath | 26 newpath |
27 0 0.25 moveto | 27 0 0.25 moveto |
28 1.3125 0.75 lineto | 28 1.3125 0.75 lineto |
29 1.3125 -0.25 lineto | 29 1.3125 -0.25 lineto |
30 0 -0.75 lineto | 30 0 -0.75 lineto |
31 closepath | 31 closepath |
32 fill | 32 fill |
33 grestore" ) | 33 grestore" ) |
34 (cons 0 1.3125) | 34 (cons 0 1.3125) |
35 (cons -.75 .75)) | 35 (cons -.75 .75)) |
36 | 36 |
37 myNoteHeads = \override NoteHead #'stencil = \parallelogram | 37 myNoteHeads = \override NoteHead.stencil = \parallelogram |
38 normalNoteHeads = \revert NoteHead #'stencil | 38 normalNoteHeads = \revert NoteHead.stencil |
39 | 39 |
40 \relative c'' { | 40 \relative c'' { |
41 \myNoteHeads | 41 \myNoteHeads |
42 g4 d' | 42 g4 d' |
43 \normalNoteHeads | 43 \normalNoteHeads |
44 <f, \tweak #'stencil \parallelogram b e>4 d | 44 <f, \tweak stencil \parallelogram b e>4 d |
45 } | 45 } |
OLD | NEW |