]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/using-postscript-to-generate-special-note-head-shapes.ly
lilypond-book robustness: ensure EOL at the end of @verbatim
[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.13.1"
4
5 \header {
6   lsrtags = "editorial-annotations, tweaks-and-overrides"
7
8 %% Translation of GIT committish: 522d964c61521ed64f352c4774c4f2860f7ae5ec
9   texidocfr = "
10 Lorsqu'il est impossible d'obtenir facilement une allure particulière
11 pour les têtes de note en recourant à la technique du @code{\\markup}, un
12 code Postscript peut vous tirer d'embarras.  Voici comment générer des
13 têtes ressemblant à des parallélogrammes.
14
15 "
16   doctitlefr = "Utilisation de Postscript pour générer des têtes de note à l'allure particulière"
17
18   texidoc = "
19 When a note head with a special shape cannot easily be generated with
20 graphic markup, PostScript code can be used to generate the shape. 
21 This example shows how a parallelogram-shaped note head is generated. 
22
23 "
24   doctitle = "Using PostScript to generate special note head shapes"
25 } % begin verbatim
26
27 parallelogram =
28   #(ly:make-stencil (list 'embedded-ps
29     "gsave
30       currentpoint translate
31       newpath
32       0 0.25 moveto
33       1.3125 0.75 lineto
34       1.3125 -0.25 lineto
35       0 -0.75 lineto
36       closepath
37       fill
38       grestore" )
39     (cons 0 1.3125)
40     (cons 0 0))
41
42 myNoteHeads = \override NoteHead #'stencil = \parallelogram
43 normalNoteHeads = \revert NoteHead #'stencil
44
45 \relative c'' {
46   \myNoteHeads
47   g4 d'
48   \normalNoteHeads
49   <f, \tweak #'stencil \parallelogram b e>4 d
50 }
51
52