10.04.2013 Views

in Snippets - LilyPond

in Snippets - LilyPond

in Snippets - 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.

Tweaks and overrides 439<br />

}<br />

\bar ""<br />

\override Staff.Rest #'style = #'classical<br />

r\maxima^\markup \typewriter { classical }<br />

r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 s128<br />

\bar ""<br />

\override Staff.Rest #'style = #'default<br />

r\maxima^\markup \typewriter { default }<br />

r\longa r\breve r1 r2 r4 r8 r16 r32 r64 r128 s128<br />

<br />

<br />

<br />

mensural<br />

<br />

<br />

neomensural<br />

<br />

classical<br />

<br />

<br />

default<br />

<br />

Rhythmic slashes<br />

In “simple” lead-sheets, sometimes no actual notes are written, <strong>in</strong>stead only “rhythmic patterns”<br />

and chords above the measures are notated giv<strong>in</strong>g the structure of a song. Such a feature is for<br />

example useful while creat<strong>in</strong>g/transcrib<strong>in</strong>g the structure of a song and also when shar<strong>in</strong>g lead<br />

sheets with guitarists or jazz musicians. The standard support for this us<strong>in</strong>g \repeat percent<br />

is unsuitable here s<strong>in</strong>ce the first beat has to be an ord<strong>in</strong>ary note or rest. This example shows two<br />

solutions to this problem, by redef<strong>in</strong><strong>in</strong>g ord<strong>in</strong>ary rests to be pr<strong>in</strong>ted as slashes. (If the duration<br />

of each beat is not a quarter note, replace the r4 <strong>in</strong> the def<strong>in</strong>itions with a rest of the appropriate<br />

duration).<br />

% Macro to pr<strong>in</strong>t s<strong>in</strong>gle slash<br />

rs = {<br />

\once \override Rest #'stencil = #ly:percent-repeat-item-<strong>in</strong>terface::beat-slash<br />

\once \override Rest #'thickness = #0.48<br />

\once \override Rest #'slope = #1.7<br />

r4<br />

}<br />

% Function to pr<strong>in</strong>t a specified number of slashes<br />

comp = #(def<strong>in</strong>e-music-function (parser location count) (<strong>in</strong>teger?)<br />

#{<br />

\override Rest #'stencil = #ly:percent-repeat-item-<strong>in</strong>terface::beat-slash<br />

\override Rest #'thickness = #0.48

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

Saved successfully!

Ooh no, something went wrong!