Fix typo in convert-ly.
[lilypond.git] / input / new / clip-systems.ly
blobe37bf09df13bb0a0f7edcdf523f278bacf6e99a9
1 \version "2.11.61"
2 \header {
3 lsrtags = "paper-and-layout" % a new tag like "Mixing text and music" or
4 % "Special output" might be more adequate -jm
5 texidoc = "
6 This code shows how to clip (extract) snippets from a full score.
8 This file needs to be run separately with @code{-dclip-systems}; the
9 snippets page may not adequately show the results.
11 The result will be files named
12 @file{@var{base}-from-@var{start}-to-@var{end}[-@var{count}].eps}.
14 @itemize
15 @item
16 If system starts and ends are included, they include extents of the
17 System grob, e.g., instrument names.
19 @item
20 Grace notes at the end point of the region are not included.
22 @item
23 Regions can span multiple systems. In this case, multiple EPS files
24 are generated.
26 @end itemize
28 doctitle = "Clip systems"
31 #(ly:set-option 'clip-systems)
32 #(set! output-count 1)
34 origScore = \score {
35 \relative c' {
36 \set Staff.instrumentName = #"bla"
39 \grace c16 e1
40 \key d \major
41 f1 \break
42 \clef bass
43 g,1
44 fis1
48 \book {
49 \score {
50 \origScore
51 \layout {
52 % Each clip-region is a (START . END) pair
53 % where both are rhythmic-locations.
55 % (make-rhythmic-locations BAR-NUMBER NUM DEN)
56 % means NUM/DEN whole-notes into bar numbered BAR-NUMBER
58 clip-regions = #(list
59 (cons
60 (make-rhythmic-location 2 0 1)
61 (make-rhythmic-location 4 0 1))
63 (cons
64 (make-rhythmic-location 0 0 1)
65 (make-rhythmic-location 4 0 1))
67 (cons
68 (make-rhythmic-location 0 0 1)
69 (make-rhythmic-location 6 0 1))
75 #(set! output-count 0)
76 #(ly:set-option 'clip-systems #f)
78 \book {
79 \score { \origScore }
80 \markup { \bold \fontsize #6 clips }
81 \score {
82 \lyrics {
83 \markup { from-2.0.1-to-4.0.1-clip.eps }
84 \markup {
85 \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps"
86 (ly:parser-output-name parser)) }