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 3: Fundamentele concepten 71<br />

}<br />

a4 b c d<br />

text = \lyricmode {<br />

Aaa Bee Cee Dee<br />

}<br />

\score {<br />

><br />

\layout { }<br />

\midi { }<br />

}<br />

Now we want to add a cello part. Let’s look at the ‘Notes only’ example:<br />

\version "2.17.21"<br />

melody = \relative c' {<br />

\clef "treble"<br />

\key c \major<br />

\time 4/4<br />

a4 b c d<br />

}<br />

\score {<br />

\new Staff \melody<br />

\layout { }<br />

\midi { }<br />

}<br />

We don’t need two \version commands. We’ll need the melody section. We don’t want two<br />

\score sections – if we had two \scores, we’d get the two parts separately. We want them<br />

together, as a duet. Within the \score section, we don’t need two \layout or \midi.<br />

If we simply cut and paste the melody section, we would end up with two melody definitions.<br />

This would not generate an error, but the second one would be used for both melodies. So let’s<br />

rename them to make them distinct. We’ll call the section for the soprano sopranoMusic and the<br />

section for the cello celloMusic. While we’re doing this, let’s rename text to be sopranoLyrics.<br />

Remember to rename both instances of all these names – both the initial definition (the melody<br />

= \relative c' { part) and the name’s use (in the \score section).<br />

While we’re doing this, let’s change the cello part’s staff – celli normally use bass clef. We’ll<br />

also give the cello some different notes.<br />

\version "2.17.21"<br />

sopranoMusic = \relative c' {<br />

\clef "treble"<br />

\key c \major<br />

\time 4/4

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

Saved successfully!

Ooh no, something went wrong!