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

{<br />

}<br />

\time 12/16<br />

\omit Staff.TimeSignature<br />

c4 b8 c d16 c d8 |<br />

g,8 a16 b8 c d4 e16 |<br />

e8<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

and the difference is obvious: setting the stencil to #f (possibly via \omit) removes the object<br />

entirely; making the object transparent (which can be done using \hide) leaves it where it is,<br />

but makes it invisible.<br />

The color property<br />

Finally let us try making the bar lines invisible by coloring them white. (There is a difficulty with<br />

this in that the white bar line may or may not blank out the staff lines where they cross. You<br />

may see in some of the examples below that this happens unpredictably. The details of why this<br />

is so and how to control it are covered in Sectie “Painting objects white” in Notatie-handleiding.<br />

But at the moment we are learning about color, so please just accept this limitation for now.)<br />

The grob-interface specifies that the color property value is a list, but there is no explanation<br />

of what that list should be. The list it requires is actually a list of values in internal units,<br />

but, to avoid having to know what these are, several ways are provided to specify colors. The<br />

first way is to use one of the ‘normal’ colors listed in the first table in Sectie “List of colors” in<br />

Notatie-handleiding. To set the bar lines to white we write:<br />

{<br />

}<br />

\time 12/16<br />

\override Staff.BarLine.color = #white<br />

c4 b8 c d16 c d8 |<br />

g,8 a16 b8 c d4 e16 |<br />

e8<br />

12 <br />

16 <br />

<br />

<br />

<br />

<br />

and again, we see the bar lines are not visible. Note that white is not preceded by an apostrophe –<br />

it is not a symbol, but a variable. When evaluated, it provides the list of internal values required<br />

to set the color to white. The other colors in the normal list are variables too. To convince<br />

yourself this is working you might like to change the color to one of the other variables in the<br />

list.<br />

The second way of changing the color is to use the list of X11 color names in the second list<br />

in Sectie “List of colors” in Notatie-handleiding. However, these are mapped to the actual values<br />

by the function x11-color which converts X11 color symbols into the list of internal values like<br />

this:<br />

{<br />

\time 12/16<br />

\override Staff.BarLine.color = #(x11-color 'white)

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

Saved successfully!

Ooh no, something went wrong!