29.11.2012 Views

mpdolce - LilyPond

mpdolce - LilyPond

mpdolce - 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.

Chapter 4: Tweaking output 86<br />

This looks a good bet to change the heaviness. It tells us that the value of thickness is a<br />

simple number, that the default value is 1.2, and that the units are in another property called<br />

line-thickness.<br />

As we said earlier, there are few to no explanations in the IR, but we already have enough<br />

information to try changing the slur thickness. We see that the name of the layout object is<br />

Slur, that the name of the property to change is thickness and that the new value should be<br />

a number somewhat larger than 1.2 if we are to make slurs thicker.<br />

We can now construct the \override command by simply substituting the values we have<br />

found for the names, omitting the context. Let’s use a very large value for the thickness at first,<br />

so we can be sure the command is working. We get:<br />

\override Slur #'thickness = #5.0<br />

Don’t forget the #' preceding the property name and a # preceding the new value!<br />

The final question is, ‘Where should this command be placed?’ While you are unsure and<br />

learning, the best answer is, ‘Within the music, before the first slur and close to it.’ Let’s do<br />

that:<br />

{<br />

}<br />

\time 6/8<br />

{<br />

% Increase thickness of all following slurs from 1.2 to 5.0<br />

\override Slur #'thickness = #5.0<br />

r4 b8 b[( g]) g |<br />

g[( e]) e d[( f]) a |<br />

a g<br />

}<br />

\addlyrics {<br />

The man who feels love's sweet e -- mo -- tion<br />

}<br />

�<br />

8 6<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

The man who feels love's sweet e motion<br />

and we see that the slur is indeed heavier.<br />

So this is the basic way of constructing \override commands. There are a few more complications<br />

that we shall meet in later sections, but you now know all the essentials required to<br />

make up your own – but you will still need some practice. This is provided in the examples<br />

which follow.<br />

Finding the context<br />

But first, what if we had needed to specify the Context? What should it be? We could guess<br />

that slurs are in the Voice context, as they are clearly closely associated with individual lines of<br />

music, but can we be sure? To find out, go back to the top of the IR page describing the Slur,<br />

where it says ‘Slur objects are created by: Slur engraver’. So slurs will be created in whichever<br />

context the Slur_engraver is in. Follow the link to the Slur_engraver page. At the very<br />

bottom it tells us that Slur_engraver is part of five Voice contexts, including the standard<br />

voice context, Voice, so our guess was correct. And because Voice is one of the lowest level<br />

contexts which is implied unambiguously by the fact that we are entering notes, we can omit it<br />

in this location.<br />

�<br />

�<br />

�<br />

�<br />

�<br />

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

Saved successfully!

Ooh no, something went wrong!