]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/drawing-circles-around-note-heads.ly
Imported Upstream version 2.19.45
[lilypond.git] / Documentation / snippets / drawing-circles-around-note-heads.ly
1 %% DO NOT EDIT this file manually; it is automatically
2 %% generated from LSR http://lsr.di.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.18.0"
8
9 \header {
10   lsrtags = "editorial-annotations"
11
12   texidoc = "
13 Here is how to circle a note.
14
15 "
16   doctitle = "Drawing circles around note heads"
17 } % begin verbatim
18
19 circle =
20 \once \override NoteHead.stencil = #(lambda (grob)
21     (let* ((note (ly:note-head::print grob))
22            (combo-stencil (ly:stencil-add
23                note
24                (circle-stencil note 0.1 0.8))))
25           (ly:make-stencil (ly:stencil-expr combo-stencil)
26             (ly:stencil-extent note X)
27             (ly:stencil-extent note Y))))
28
29 { \circle c'' }