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.

Vocal music 192<br />

Vocal music<br />

Section “Vocal music” <strong>in</strong> Notation Reference<br />

Add<strong>in</strong>g ambitus per voice<br />

Ambitus can be added per voice. In this case, the ambitus must be moved manually to prevent<br />

collisions.<br />

\new Staff ><br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

Add<strong>in</strong>g <strong>in</strong>dicators to staves which get split after a break<br />

This snippet def<strong>in</strong>es the \splitStaffBarL<strong>in</strong>e command, which adds arrows <strong>in</strong> north-east and<br />

south-east directions at a bar l<strong>in</strong>e, to denote that several voices shar<strong>in</strong>g a staff will each cont<strong>in</strong>ue<br />

on a staff of their own <strong>in</strong> the next system.<br />

#(def<strong>in</strong>e-markup-command (arrow-at-angle layout props angle-deg length fill)<br />

(number? number? boolean?)<br />

(let* (<br />

;; PI-OVER-180 and degrees->radians are taken from flag-styles.scm<br />

(PI-OVER-180 (/ (atan 1 1) 45))<br />

(degrees->radians (lambda (degrees) (* degrees PI-OVER-180)))<br />

(angle-rad (degrees->radians angle-deg))<br />

(target-x (* length (cos angle-rad)))<br />

(target-y (* length (s<strong>in</strong> angle-rad))))<br />

(<strong>in</strong>terpret-markup layout props<br />

(markup<br />

#:translate (cons (/ target-x 2) (/ target-y 2))<br />

#:rotate angle-deg<br />

#:translate (cons (/ length -2) 0)<br />

#:concat (#:draw-l<strong>in</strong>e (cons length 0)<br />

#:arrow-head X RIGHT fill)))))

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

Saved successfully!

Ooh no, something went wrong!