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