10.04.2013 Views

in Snippets - LilyPond

in Snippets - LilyPond

in Snippets - LilyPond

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.

Tweaks and overrides 443<br />

Show<strong>in</strong>g the same articulation above and below a note or chord<br />

By default, <strong>LilyPond</strong> does not allow the same articulation (e.g., an accent, a fermata, a flageolet,<br />

etc.) to be displayed above and below a note. For example, c4 \fermata^\fermata will only<br />

show a fermata below. The fermata above will simply be ignored. However, one can stick scripts<br />

(just like f<strong>in</strong>ger<strong>in</strong>gs) <strong>in</strong>side a chord, which means it is possible to have as many articulations as<br />

desired. This approach has the advantage that it ignores the stem and positions the articulation<br />

relative to the note head. This can be seen <strong>in</strong> the case of the flageolets <strong>in</strong> the snippet. To<br />

mimic the behaviour of scripts outside a chord, ’add-stem-support would be required. So,<br />

the solution is to write the note as a chord and add the articulations <strong>in</strong>side the . The<br />

direction will always be above, but one can tweak this via a \tweak: 4^\smallFlageolet_\smallFlageolet<br />

}<br />

s4^"Works if written <strong>in</strong>side a chord:"<br />

4<br />

4<br />

4<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Wrong: Works if written <strong>in</strong>side a chord:<br />

Str<strong>in</strong>g number extender l<strong>in</strong>es<br />

<br />

<br />

Make an extender l<strong>in</strong>e for str<strong>in</strong>g number <strong>in</strong>dications, show<strong>in</strong>g that a series of notes is supposed<br />

to be played all on the same str<strong>in</strong>g.<br />

str<strong>in</strong>gNumberSpanner =<br />

#(def<strong>in</strong>e-music-function (parser location Str<strong>in</strong>gNumber) (str<strong>in</strong>g?)<br />

#{<br />

\override TextSpanner #'style = #'solid<br />

\override TextSpanner #'font-size = #-5<br />

\override TextSpanner #'(bound-details left stencil-align-dir-y) = #CENTER<br />

\override TextSpanner #'(bound-details left text) = \markup { \circle \number #Str<strong>in</strong>gNum<br />

#})

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

Saved successfully!

Ooh no, something went wrong!