10.04.2013 Views

in Snippets - LilyPond

in Snippets - LilyPond

in Snippets - LilyPond

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Editorial annotations 156<br />

}<br />

c4. c4<br />

\mark "F"<br />

c1<br />

<br />

foo <br />

<br />

F <br />

Draw<strong>in</strong>g circles around note heads<br />

Here is how to circle a note.<br />

circle =<br />

\once \override NoteHead #'stencil = #(lambda (grob)<br />

(let* ((note (ly:note-head::pr<strong>in</strong>t grob))<br />

(combo-stencil (ly:stencil-add<br />

note<br />

(circle-stencil note 0.1 0.8))))<br />

(ly:make-stencil (ly:stencil-expr combo-stencil)<br />

(ly:stencil-extent note X)<br />

(ly:stencil-extent note Y))))<br />

{ \circle c' }<br />

<br />

<br />

Draw<strong>in</strong>g circles around various objects<br />

The \circle markup command draws circles around various objects, for example f<strong>in</strong>ger<strong>in</strong>g<br />

<strong>in</strong>dications. For other objects, specific tweaks may be required: this example demonstrates two<br />

strategies for rehearsal marks and measure numbers.<br />

\relative c' {<br />

c1<br />

\set Score.markFormatter =<br />

#(lambda (mark context)<br />

(make-circle-markup (format-mark-numbers mark context)))<br />

\mark \default<br />

}<br />

c2 d^\markup {<br />

\override #'(thickness . 3) {<br />

\circle \f<strong>in</strong>ger 2<br />

}<br />

}<br />

\override Score.BarNumber #'break-visibility = #all-visible<br />

\override Score.BarNumber #'stencil =<br />

#(make-stencil-circler 0.1 0.25 ly:text-<strong>in</strong>terface::pr<strong>in</strong>t)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!