09.09.2013 Views

LilyPond Beginnershandleiding

LilyPond Beginnershandleiding

LilyPond Beginnershandleiding

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Hoofdstuk 4: Tweaking output 95<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 that<br />

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

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

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

the Slur_engraver is in. Follow the link to the Slur_engraver page. At the very bottom it tells<br />

us that Slur_engraver is part of seven Voice contexts, including the standard voice context,<br />

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

implied unambiguously by the fact that we are entering notes, we can omit it in this location.<br />

Overriding once only<br />

As you can see, all the slurs are thicker in the final example above. But what if we wanted just<br />

the first slur to be thicker? This is achieved with the \once command. Placed immediately before<br />

the \override command it causes it to change only the slur which begins on the immediately<br />

following note. If the immediately following note does not begin a slur the command has no<br />

effect at all – it is not remembered until a slur is encountered, it is simply discarded. So the<br />

command with \once must be repositioned as follows:<br />

{<br />

}<br />

\key es \major<br />

\time 6/8<br />

{<br />

r4 bes8<br />

% Increase thickness of immediately following slur only<br />

\once \override Slur.thickness = #5.0<br />

bes8[( g]) g |<br />

g8[( es]) es d[( f]) as |<br />

as8 g<br />

}<br />

\addlyrics {<br />

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

}<br />

8<br />

6<br />

<br />

Now only the first slur is made heavier.<br />

<br />

<br />

<br />

sweet<br />

The<br />

love's e<br />

<br />

man who feels<br />

<br />

<br />

motion<br />

The \once command can also be used before the \set command.<br />

Reverting<br />

Finally, what if we wanted just the first two slurs to be heavier? Well, we could use two commands,<br />

each preceded by \once placed immediately before each of the notes where the slurs<br />

begin:<br />

{<br />

\key es \major<br />

\time 6/8

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

Saved successfully!

Ooh no, something went wrong!