29.11.2012 Views

mpdolce - LilyPond

mpdolce - LilyPond

mpdolce - LilyPond

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

Chapter 3: Fundamental concepts 41<br />

\score {<br />

<br />

\new PianoStaff = "piano" ><br />

>><br />

\layout { }<br />

}<br />

�<br />

�<br />

�<br />

�<br />

� �<br />

�<br />

�<br />

��<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

�<br />

And God said,<br />

��<br />

�<br />

�<br />

�<br />

Be careful about the difference between notes, which are introduced with \relative or which<br />

are directly included in a music expression, and lyrics, which are introduced with \lyricmode.<br />

These are essential to tell <strong>LilyPond</strong> to interpret the following content as music and text respectively.<br />

When writing (or reading) a \score section, just take it slowly and carefully. Start with the<br />

outer level, then work on each smaller level. It also really helps to be strict with indentation –<br />

make sure that each item on the same level starts on the same horizontal position in your text<br />

editor.<br />

See also<br />

Notation Reference: Section “Structure of a score” in Notation Reference.<br />

3.1.3 Nesting music expressions<br />

It is not essential to declare all staves at the beginning; they may be introduced temporarily at<br />

any point. This is particularly useful for creating ossia sections – see Section “ossia” in Music<br />

Glossary. Here is a simple example showing how to introduce a new staff temporarily for the<br />

duration of three notes:<br />

\new Staff {<br />

\relative g' {<br />

r4 g8 g c4 c8 d |<br />

e4 r8

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

Saved successfully!

Ooh no, something went wrong!