]> git.donarmstrong.com Git - lilypond.git/blob - Documentation/snippets/drawing-circles-around-note-heads.ly
Merge branch 'lilypond/translation'
[lilypond.git] / Documentation / snippets / drawing-circles-around-note-heads.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"
8
9   texidoc = "
10 Here is how to circle a note.
11
12 "
13   doctitle = "Drawing circles around note heads"
14 } % begin verbatim
15
16 circle =
17 \once \override NoteHead #'stencil = #(lambda (grob)
18     (let* ((note (ly:note-head::print grob))
19            (combo-stencil (ly:stencil-add
20                note
21                (circle-stencil note 0.1 0.8))))
22           (ly:make-stencil (ly:stencil-expr combo-stencil)
23             (ly:stencil-extent note X)
24             (ly:stencil-extent note Y))))
25
26 { \circle c' }