]> git.donarmstrong.com Git - lilypond.git/blobdiff - Documentation/snippets/drawing-circles-around-note-heads.ly
Imported Upstream version 2.14.2
[lilypond.git] / Documentation / snippets / drawing-circles-around-note-heads.ly
diff --git a/Documentation/snippets/drawing-circles-around-note-heads.ly b/Documentation/snippets/drawing-circles-around-note-heads.ly
new file mode 100644 (file)
index 0000000..dc67777
--- /dev/null
@@ -0,0 +1,29 @@
+%% DO NOT EDIT this file manually; it is automatically
+%% generated from LSR http://lsr.dsi.unimi.it
+%% Make any changes in LSR itself, or in Documentation/snippets/new/ ,
+%% and then run scripts/auxiliar/makelsr.py
+%%
+%% This file is in the public domain.
+\version "2.14.0"
+
+\header {
+  lsrtags = "editorial-annotations"
+
+  texidoc = "
+Here is how to circle a note.
+
+"
+  doctitle = "Drawing circles around note heads"
+} % begin verbatim
+
+circle =
+\once \override NoteHead #'stencil = #(lambda (grob)
+    (let* ((note (ly:note-head::print grob))
+           (combo-stencil (ly:stencil-add
+               note
+               (circle-stencil note 0.1 0.8))))
+          (ly:make-stencil (ly:stencil-expr combo-stencil)
+            (ly:stencil-extent note X)
+            (ly:stencil-extent note Y))))
+
+{ \circle c' }