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

• self-alignment-X<br />

This property can be used to align the object to the left, to the right, or to center it with<br />

respect to the parent object’s reference point. It may be used with all objects which<br />

support the self-alignment-interface. In general these are objects that contain<br />

text. The values are LEFT, RIGHT or CENTER. Alternatively, a numerical value between<br />

-1 and +1 may be specified, where -1 is left-aligned, +1 is right-aligned, and numbers<br />

in between move the text progressively from left-aligned to right-aligned. Numerical<br />

values greater than 1 may be specified to move the text even further to the left, or<br />

less than -1 to move the text even further to the right. A change of 1 in the value<br />

corresponds to a movement of half the text’s length.<br />

• extra-spacing-width<br />

This property is available for all objects which support the item-interface. It takes<br />

two numbers, the first is added to the leftmost extent and the second is added to the<br />

rightmost extent. Negative numbers move the edge to the left, positive to the right, so<br />

to widen an object the first number must be negative, the second positive. Note that<br />

not all objects honor both numbers. For example, the Accidental object only takes<br />

notice of the first (left edge) number.<br />

• staff-position<br />

staff-position is a property of the staff-symbol-referencer-interface, which is<br />

supported by objects which are positioned relative to the staff. It specifies the vertical<br />

position of the object relative to the center line of the staff in half staff-spaces. It is<br />

useful in resolving collisions between layout objects like multi-measure rests, ties and<br />

notes in different voices.<br />

• force-hshift<br />

Closely spaced notes in a chord, or notes occurring at the same time in different voices,<br />

are arranged in two, occasionally more, columns to prevent the note heads overlapping.<br />

These are called note columns, and an object called NoteColumn is created to lay out<br />

the notes in that column.<br />

The force-hshift property is a property of a NoteColumn (actually of the notecolumn-interface).<br />

Changing it permits a note column to be moved in units appropriate<br />

to a note column, viz. the note head width of the first voice note. It should be<br />

used in complex situations where the normal \shiftOn commands (see Section 3.2.2<br />

[Explicitly instantiating voices], page 48) do not resolve the note conflict. It is preferable<br />

to the extra-offset property for this purpose as there is no need to work out<br />

the distance in staff-spaces, and moving the notes into or out of a NoteColumn affects<br />

other actions such as merging note heads.<br />

3. Finally, when all else fails, objects may be manually repositioned relative to the staff center<br />

line vertically, or by displacing them by any distance to a new position. The disadvantages<br />

are that the correct values for the repositioning have to be worked out, often by trial and<br />

error, for every object individually, and, because the movement is done after <strong>LilyPond</strong> has<br />

placed all other objects, the user is responsible for avoiding any collisions that might ensue.<br />

But the main difficulty with this approach is that the repositioning values may need to be<br />

reworked if the music is later modified. The properties that can be used for this type of<br />

manual repositioning are:<br />

extra-offset<br />

This property applies to any layout object supporting the grob-interface. It<br />

takes a pair of numbers which specify the extra displacement in the horizontal<br />

and vertical directions. Negative numbers move the object to the left or down.<br />

The units are staff-spaces. The extra displacement is made after the typeset-

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

Saved successfully!

Ooh no, something went wrong!