27.03.2013 Views

in Snippets - LilyPond

in Snippets - LilyPond

in Snippets - LilyPond

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Tweaks and overrides 453<br />

6<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

8<br />

<br />

<br />

8<br />

<br />

<br />

Tweak<strong>in</strong>g grace layout with<strong>in</strong> music<br />

<br />

The layout of grace expressions can be changed throughout the music us<strong>in</strong>g the functions<br />

add-grace-property and remove-grace-property. The follow<strong>in</strong>g example undef<strong>in</strong>es the Stem<br />

direction for this grace, so that stems do not always po<strong>in</strong>t up, and changes the default note<br />

heads to crosses.<br />

\relative c'' {<br />

\new Staff {<br />

$(remove-grace-property 'Voice 'Stem 'direction)<br />

$(add-grace-property 'Voice 'NoteHead 'style 'cross)<br />

\new Voice {<br />

\acciaccatura { f16 } g4<br />

\grace { d16[ e] } f4<br />

\appoggiatura { f,32[ g a] } e2<br />

}<br />

}<br />

}<br />

<br />

<br />

<br />

<br />

<br />

Us<strong>in</strong>g alternative flag styles<br />

Alternative styles of flag on eighth and shorter notes can be displayed by overrid<strong>in</strong>g the stencil<br />

property of Flag. Valid values are modern-straight-flag and old-straight-flag.<br />

testnotes = {<br />

\autoBeamOff<br />

c8 d16 c32 d64 \acciaccatura { c8 } d64 r4<br />

}<br />

\relative c' {<br />

\time 2/4<br />

\testnotes<br />

}<br />

\override Flag #'stencil = #modern-straight-flag<br />

\testnotes<br />

\override Flag #'stencil = #old-straight-flag<br />

\testnotes<br />

\revert Flag #'stencil<br />

\testnotes

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

Saved successfully!

Ooh no, something went wrong!