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.

Spacing 371<br />

<br />

<br />

<br />

<br />

3<br />

<br />

<br />

<br />

Vertically aligned dynamics and textscripts<br />

<br />

<br />

<br />

By setting the 'Y-extent property to a suitable value, all DynamicLineSpanner objects (hairpins<br />

and dynamic texts) can be aligned to a common reference point, regardless of their actual extent.<br />

This way, every element will be vertically aligned, thus producing a more pleasing output.<br />

The same idea is used to align the text scripts along their baseline.<br />

music = \relative c'' {<br />

c2\p^\markup { gorgeous } c\f^\markup { fantastic }<br />

c4\p c\f\> c c\!\p<br />

}<br />

{<br />

}<br />

3<br />

\music \break<br />

\override DynamicLineSpanner #'staff-padding = #2.0<br />

\override DynamicLineSpanner #'Y-extent = #'(-1.5 . 1.5)<br />

\override TextScript #'Y-extent = #'(-1.5 . 1.5)<br />

\music<br />

<br />

<br />

<br />

<br />

gorgeous<br />

<br />

p<br />

gorgeous<br />

<br />

p<br />

<br />

fantastic<br />

f<br />

fantastic<br />

Vertically aligning ossias and lyrics<br />

<br />

f<br />

This snippet demonstrates the use of the context properties alignBelowContext and<br />

alignAboveContext to control the positioning of lyrics and ossias.<br />

\paper {<br />

ragged-right = ##t<br />

}<br />

\relative c'

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

Saved successfully!

Ooh no, something went wrong!