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 4: Tweaking output 114<br />

\ottava #0<br />

c,4 c c c |<br />

<br />

<br />

8va<br />

Slower<br />

pp<br />

Text<br />

<br />

ff<br />

<br />

<br />

<br />

This example also shows how to create Text Spanners – text with extender lines above a section<br />

of music. The spanner extends from the \startTextSpan command to the \stopTextSpan<br />

command, and the format of the text is defined by the \override TextSpanner command. For<br />

more details see Sectie “Text spanners” in Notatie-handleiding.<br />

It also shows how ottava brackets are created.<br />

If the default values of outside-staff-priority do not give you the placing you want, the<br />

priority of any of the objects may be overridden. Suppose we would like the ottava bracket to be<br />

placed below the text spanner in the example above. All we need to do is to look up the priority<br />

of OttavaBracket in the IR or in the tables above, and reduce it to a value lower than that of<br />

a TextSpanner, remembering that OttavaBracket is created in the Staff context:<br />

% Set details for later Text Spanner<br />

\override TextSpanner.bound-details.left.text<br />

= \markup { \small \bold Slower }<br />

% Place dynamics above staff<br />

\dynamicUp<br />

% Place following Ottava Bracket below Text Spanners<br />

\once \override Staff.OttavaBracket.outside-staff-priority = #340<br />

% Start Ottava Bracket<br />

\ottava #1<br />

c'4 \startTextSpan<br />

% Add Dynamic Text<br />

c4\pp<br />

% Add Dynamic Line Spanner<br />

c4\<<br />

% Add Text Script<br />

c4^Text |<br />

c4 c<br />

% Add Dynamic Text<br />

c4\ff c \stopTextSpan |<br />

% Stop Ottava Bracket<br />

\ottava #0<br />

c,4 c c c |<br />

<br />

<br />

Slower<br />

8va<br />

pp<br />

Text<br />

<br />

ff<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Note that some of these objects, in particular bar numbers, metronome marks and rehearsal<br />

marks, live by default in the Score context, so be sure to use the correct context when these<br />

are being overriden.

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

Saved successfully!

Ooh no, something went wrong!