27.03.2013 Views

LilyPond Snippets

LilyPond Snippets

LilyPond Snippets

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.

Tweaks and overrides 346<br />

}<br />

3<br />

5<br />

4 3<br />

<br />

<br />

12<br />

16<br />

<br />

<br />

<br />

12<br />

16 <br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Using PostScript to generate special note head shapes<br />

<br />

<br />

When a note head with a special shape cannot easily be generated with graphic markup, Post-<br />

Script code can be used to generate the shape. This example shows how a parallelogram-shaped<br />

note head is generated.<br />

parallelogram =<br />

#(ly:make-stencil (list 'embedded-ps<br />

"gsave<br />

currentpoint translate<br />

newpath<br />

0 0.25 moveto<br />

1.3125 0.75 lineto<br />

1.3125 -0.25 lineto<br />

0 -0.75 lineto<br />

closepath<br />

fill<br />

grestore" )<br />

(cons 0 1.3125)<br />

(cons 0 0))<br />

myNoteHeads = \override NoteHead #'stencil = \parallelogram<br />

normalNoteHeads = \revert NoteHead #'stencil<br />

\relative c'' {<br />

\myNoteHeads<br />

g4 d'<br />

\normalNoteHeads<br />

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

Saved successfully!

Ooh no, something went wrong!