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.

Paper and layout 465<br />

<br />

ff<br />

<br />

<br />

<br />

Clip systems<br />

<br />

<br />

f<br />

This code shows how to clip (extract) snippets from a full score.<br />

This file needs to be run separately with -dclip-systems; the snippets page may not adequately<br />

show the results.<br />

The result will be files named ‘base-from-start-to-end[-count].eps’.<br />

If system starts and ends are <strong>in</strong>cluded, they <strong>in</strong>clude extents of the System grob, e.g., <strong>in</strong>strument<br />

names.<br />

Grace notes at the end po<strong>in</strong>t of the region are not <strong>in</strong>cluded.<br />

Regions can span multiple systems. In this case, multiple EPS files are generated.<br />

#(ly:set-option 'clip-systems)<br />

#(def<strong>in</strong>e output-suffix "1")<br />

origScore = \score {<br />

\relative c' {<br />

\set Staff.<strong>in</strong>strumentName = #"bla"<br />

c1<br />

d1<br />

\grace c16 e1<br />

\key d \major<br />

f1 \break<br />

\clef bass<br />

g,1<br />

fis1<br />

}<br />

}<br />

\book {<br />

\score {<br />

\origScore<br />

\layout {<br />

% Each clip-region is a (START . END) pair<br />

% where both are rhythmic-locations.<br />

% (make-rhythmic-locations BAR-NUMBER NUM DEN)<br />

% means NUM/DEN whole-notes <strong>in</strong>to bar numbered BAR-NUMBER<br />

clip-regions = #(list<br />

(cons<br />

(make-rhythmic-location 2 0 1)<br />

(make-rhythmic-location 4 0 1))<br />

(cons<br />

(make-rhythmic-location 0 0 1)<br />

(make-rhythmic-location 4 0 1))

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

Saved successfully!

Ooh no, something went wrong!