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