]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/clip-systems.ly
Merge branch 'master' of /home/lilycvs/git/lily/
[lilypond.git] / input / lsr / clip-systems.ly
1 %% Do not edit this file; it is auto-generated from LSR!
2 %% Tags: paper-and-layout
3 \header {
4   texidoc = "Clipping snippets from a finished score
5
6 Notes:
7
8 @itemize @bullet
9 @item If system starts and ends are included, they include extents of the System grob, eg. instrument names.
10 @item Grace notes  at the end point of the region are not included
11 @item Regions can span multiple systems. In this case, multiple EPS files are generated.
12 @end itemize
13
14 This file needs to be run separately with @code{-dclip-systems}; the
15 collated-files.html of the regression test does not adequately show
16 the results.
17
18 The result will be files named
19 @file{@var{base}-from-@var{start}-to-@var{end}[-@var{count}].eps}.
20 "
21
22 }
23 % begin verbatim
24 \version "2.11.35"
25
26 #(ly:set-option 'clip-systems)
27
28 #(set! output-count 1)
29
30 origScore = \score{
31     \relative {
32       \set Staff.instrumentName = #"bla"
33       c1
34       d
35       \grace c16
36       e1
37       \key d\major
38       
39       f
40       \break  \clef bass
41       g,
42       fis
43     }  
44 }
45
46 \book { 
47   \score {
48     \origScore
49     \layout {
50
51       %% each clip-region is a (START . END) pair
52       %% where both are rhythmic-locations.
53       
54       %% (make-rhythmic-locations BAR-NUMBER NUM DEN)
55       %% means NUM/DEN whole-notes into bar numbered BAR-NUMBER
56
57       clip-regions
58       = #(list
59           (cons
60            (make-rhythmic-location 2 0 1)
61            (make-rhythmic-location 4 0 1))
62
63           (cons
64            (make-rhythmic-location 0 0 1)
65            (make-rhythmic-location 4 0 1))
66           
67           (cons
68            (make-rhythmic-location 0 0 1)
69            (make-rhythmic-location 6 0 1))
70         )
71     }
72   }
73 }
74
75 #(set! output-count 0)
76 #(ly:set-option 'clip-systems #f)
77
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 { \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps" (ly:parser-output-name parser)) }
85     }
86   }
87 }