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