]> git.donarmstrong.com Git - lilypond.git/blobdiff - input/lsr/using-postscript-to-generate-special-note-head-shapes.ly
LSR: Update.
[lilypond.git] / input / lsr / using-postscript-to-generate-special-note-head-shapes.ly
diff --git a/input/lsr/using-postscript-to-generate-special-note-head-shapes.ly b/input/lsr/using-postscript-to-generate-special-note-head-shapes.ly
new file mode 100644 (file)
index 0000000..3240b79
--- /dev/null
@@ -0,0 +1,40 @@
+%% Do not edit this file; it is auto-generated from LSR http://lsr.dsi.unimi.it
+%% This file is in the public domain.
+\version "2.11.62"
+
+\header {
+  lsrtags = "editorial-annotations, tweaks-and-overrides"
+
+  texidoc = "
+When a note head with a special shape cannot easily be generated with
+graphic markup, PostScript code can be used to generate the shape. 
+This example shows how a parallelogram-shaped note head is generated. 
+
+"
+  doctitle = "Using PostScript to generate special note head shapes"
+} % begin verbatim
+parallelogram =
+  #(ly:make-stencil (list 'embedded-ps
+    "gsave
+      currentpoint translate
+      newpath
+      0 0.25 moveto
+      1.3125 0.75 lineto
+      1.3125 -0.25 lineto
+      0 -0.75 lineto
+      closepath
+      fill
+      grestore" )
+    (cons 0 1.3125)
+    (cons 0 0))
+
+myNoteHeads = \override NoteHead #'stencil = \parallelogram
+normalNoteHeads = \revert NoteHead #'stencil
+
+\relative c'' {
+  \myNoteHeads
+  g4 d'
+  \normalNoteHeads
+  <f, \tweak #'stencil \parallelogram b e>4 d
+}
+