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 113<br />

5 3<br />

2<br />

2 <br />

2 5<br />

3<br />

2<br />

1<br />

2 2 5<br />

3<br />

4.4.3 Outside-staff objects<br />

1<br />

1<br />

2<br />

<br />

3<br />

2<br />

1<br />

5<br />

<br />

<br />

2<br />

Outside-staff objects are automatically placed to avoid collisions. There are several ways to<br />

override the automatic placement if the positioning is not optimum.<br />

The outside-staff-priority property<br />

Objects with the lower value of the outside-staff-priority property are placed nearer to<br />

the staff, and other outside-staff objects are then raised as far as necessary to avoid collisions.<br />

The outside-staff-priority is defined in the grob-interface and so is a property of all<br />

layout objects. By default it is set to #f for all within-staff objects, and to a numerical value<br />

appropriate to each outside-staff object when the object is created. The following table shows<br />

the default numerical values for some of the commonest outside-staff objects.<br />

Note the unusual names for some of the objects: spanner objects are automatically created<br />

to control the vertical positioning of grobs which (might) start and end at different musical<br />

moments, so changing the outside-staff-priority of the underlying grob will have no effect.<br />

For example, changing outside-staff-priority of the Hairpin object will have no effect on the<br />

vertical positioning of hairpins – you must change outside-staff-priority of the associated<br />

DynamicLineSpanner object instead. This override must be placed at the start of the spanner,<br />

which might include several linked hairpins and dynamics.<br />

Layout Object Priority Controls position of:<br />

RehearsalMark 1500 Rehearsal marks<br />

MetronomeMark 1000 Metronome marks<br />

VoltaBracketSpanner 600 Volta brackets<br />

TextScript 450 Markup text<br />

MultiMeasureRestText 450 Markup text over full-bar<br />

rests<br />

OttavaBracket 400 Ottava brackets<br />

TextSpanner 350 Text spanners<br />

DynamicLineSpanner 250 All dynamic markings<br />

BarNumber 100 Bar numbers<br />

TrillSpanner 50 Spanning trills<br />

Here is an example showing the default placement of some of these.<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 />

% Start Ottava Bracket<br />

\ottava #1<br />

c'4 \startTextSpan<br />

% Add Dynamic Text and hairpin<br />

c4\pp\<<br />

c4<br />

% Add Text Script<br />

c4^Text |<br />

c4 c<br />

% Add Dynamic Text and terminate hairpin<br />

c4\ff c \stopTextSpan |<br />

% Stop Ottava Bracket<br />

1 2 35

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

Saved successfully!

Ooh no, something went wrong!