]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/clip-systems.ly
Merge branch 'master' of git://git.sv.gnu.org/lilypond
[lilypond.git] / input / lsr / clip-systems.ly
1 %% Do not edit this file; it is auto-generated from input/new
2 %% This file is in the public domain.
3 \version "2.11.38"
4 \layout { ragged-right= ##t }
5 \header {
6   lsrtags = "paper-and-layout"  % a new tag like "Mixing text and music" or
7 % "Special output" might be more adequate -jm
8   texidoc = "
9 This code shows how to clip (extract) snippets from a full score.
10
11 This file needs to be run separately with @code{-dclip-systems}; the
12 snippets page may not adequately show the results.
13
14 The result will be files named
15 @file{@var{base}-from-@var{start}-to-@var{end}[-@var{count}].eps}.
16
17 @itemize @bullet
18 @item If system starts and ends are included, they include extents of the System grob, e.g., instrument names.
19 @item Grace notes at the end point of the region are not included.
20 @item Regions can span multiple systems. In this case, multiple EPS files are generated.
21 @end itemize
22 "
23   doctitle = "Clip systems"
24 } % begin verbatim
25
26 #(ly:set-option 'clip-systems)
27 #(set! output-count 1)
28
29 origScore = \score {
30   \relative c' {
31     \set Staff.instrumentName = #"bla"
32     c1
33     d
34     \grace c16 e1
35     \key d \major
36     f \break
37     \clef bass
38     g,
39     fis
40   }
41 }
42
43 \book {
44   \score {
45     \origScore
46     \layout {
47       % Each clip-region is a (START . END) pair
48       % where both are rhythmic-locations.
49       
50       % (make-rhythmic-locations BAR-NUMBER NUM DEN)
51       % means NUM/DEN whole-notes into bar numbered BAR-NUMBER
52
53       clip-regions = #(list
54       (cons
55        (make-rhythmic-location 2 0 1)
56        (make-rhythmic-location 4 0 1))
57       
58       (cons
59        (make-rhythmic-location 0 0 1)
60        (make-rhythmic-location 4 0 1))
61
62       (cons
63        (make-rhythmic-location 0 0 1)
64        (make-rhythmic-location 6 0 1))
65       )
66     }
67   }
68 }
69
70 #(set! output-count 0)
71 #(ly:set-option 'clip-systems #f)
72
73 \book {
74   \score { \origScore }
75   \markup { \bold \fontsize #6 clips }
76   \score {
77     \lyrics {
78       \markup { from-2.0.1-to-4.0.1-clip.eps }
79       \markup { \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps" (ly:parser-output-name parser)) }
80     }
81   }
82 }