]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/using-postscript-to-generate-special-note-head-shapes.ly
Issue 5167/6: Changes: show \markup xxx = ... \etc assignments
[lilypond.git] / Documentation / snippets / using-postscript-to-generate-special-note-head-shapes.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.unimi.it
3 %% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
4 %% and then run scripts/auxiliar/makelsr.py
5 %%
6 %% This file is in the public domain.
7 \version "2.18.0"
8
9 \header {
10   lsrtags = "editorial-annotations, really-cool, scheme-language, tweaks-and-overrides"
11
12   texidoc = "
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.
15 This example shows how a parallelogram-shaped note head is generated.
16
17 "
18   doctitle = "Using PostScript to generate special note head shapes"
19 } % begin verbatim
20
21 parallelogram =
22   #(ly:make-stencil (list 'embedded-ps
23     "gsave
24       currentpoint translate
25       newpath
26       0 0.25 moveto
27       1.3125 0.75 lineto
28       1.3125 -0.25 lineto
29       0 -0.75 lineto
30       closepath
31       fill
32       grestore" )
33     (cons 0 1.3125)
34     (cons -.75 .75))
35
36 myNoteHeads = \override NoteHead.stencil = \parallelogram
37 normalNoteHeads = \revert NoteHead.stencil
38
39 \relative c'' {
40   \myNoteHeads
41   g4 d'
42   \normalNoteHeads
43   <f, \tweak stencil \parallelogram b e>4 d
44 }