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.

Expressive marks 77<br />

}<br />

}<br />

>><br />

% orig<strong>in</strong>al voice with chords rearranged so that<br />

% glissando is attached to a & c<br />

2\glissando <br />

<br />

<br />

<br />

Dynamics custom text spanner postfix<br />

Postfix functions for custom crescendo text spanners. The spanners should start on the first note<br />

of the measure. One has to use -\mycresc, otherwise the spanner start will rather be assigned<br />

to the next note.<br />

% Two functions for (de)crescendo spanners where you can explicitly give the<br />

% spanner text.<br />

mycresc =<br />

#(def<strong>in</strong>e-music-function (parser location mymarkup) (markup?)<br />

(make-music 'CrescendoEvent<br />

'span-direction START<br />

'span-type 'text<br />

'span-text mymarkup))<br />

mydecresc =<br />

#(def<strong>in</strong>e-music-function (parser location mymarkup) (markup?)<br />

(make-music 'DecrescendoEvent<br />

'span-direction START<br />

'span-type 'text<br />

'span-text mymarkup))<br />

\relative c' {<br />

c4-\mycresc "custom cresc" c4 c4 c4 |<br />

c4 c4 c4 c4 |<br />

c4-\mydecresc "custom decresc" c4 c4 c4 |<br />

c4 c4\! c4 c4<br />

}<br />

<br />

<br />

custom cresc<br />

Dynamics text spanner postfix<br />

custom decresc<br />

Custom text spanners can be def<strong>in</strong>ed and used with hairp<strong>in</strong> and text crescendos. \< and \><br />

produce hairp<strong>in</strong>s by default, \cresc etc. produce text spanners by default.<br />

% Some sample text dynamic spanners, to be used as postfix operators<br />

crpoco =<br />

#(make-music 'CrescendoEvent<br />

'span-direction START

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

Saved successfully!

Ooh no, something went wrong!