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