09.09.2013 Views

LilyPond Beginnershandleiding

LilyPond Beginnershandleiding

LilyPond Beginnershandleiding

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.

Hoofdstuk 3: Fundamentele concepten 86<br />

3.4.5 Scores and parts<br />

In orchestral music, all notes are printed twice. Once in a part for the musicians, and once in a<br />

full score for the conductor. Variables can be used to avoid double work. The music is entered<br />

once, and stored in a variable. The contents of that variable is then used to generate both the<br />

part and the full score.<br />

It is convenient to define the notes in a special file. For example, suppose that the file<br />

‘horn-music.ly’ contains the following part of a horn/bassoon duo<br />

hornNotes = \relative c {<br />

\time 2/4<br />

r4 f8 a | cis4 f | e4 d |<br />

}<br />

Then, an individual part is made by putting the following in a file<br />

\include "horn-music.ly"<br />

\header {<br />

instrument = "Horn in F"<br />

}<br />

{<br />

\transpose f c' \hornNotes<br />

}<br />

The line<br />

\include "horn-music.ly"<br />

substitutes the contents of ‘horn-music.ly’ at this position in the file, so hornNotes is defined<br />

afterwards. The command \transpose f c' indicates that the argument, being \hornNotes,<br />

should be transposed by a fifth upwards. Sounding f is denoted by notated c', which corresponds<br />

with the tuning of a normal French Horn in F. The transposition can be seen in the following<br />

output<br />

4 <br />

2 <br />

<br />

<br />

In ensemble pieces, one of the voices often does not play for many measures. This is denoted<br />

by a special rest, the multi-measure rest. It is entered with a capital R followed by a duration<br />

(1 for a whole note, 2 for a half note, etc.). By multiplying the duration, longer rests can be<br />

constructed. For example, this rest takes 3 measures in 2/4 time<br />

R2*3<br />

When printing the part, multi-rests must be condensed. This is done by setting a run-time<br />

variable<br />

\set Score.skipBars = ##t<br />

This command sets the property skipBars in the Score context to true (##t). Prepending the<br />

rest and this option to the music above, leads to the following result<br />

<br />

4 2<br />

3<br />

<br />

<br />

<br />

<br />

<br />

The score is made by combining all of the music together. Assuming that the other voice is<br />

in bassoonNotes in the file ‘bassoon-music.ly’, a score is made with

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

Saved successfully!

Ooh no, something went wrong!