]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/clip-systems.ly
Merge branch 'lilypond/translation' of ssh://jomand@git.sv.gnu.org/srv/git/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 %% Note: this file works from version 2.12.0
4 \version "2.13.1"
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
18 @item
19 If system starts and ends are included, they include extents of the
20 System grob, e.g., instrument names.
21
22 @item
23 Grace notes at the end point of the region are not included.
24
25 @item
26 Regions can span multiple systems.  In this case, multiple EPS files
27 are generated.
28
29 @end itemize
30 "
31   doctitle = "Clip systems"
32 } % begin verbatim
33
34
35 #(ly:set-option 'clip-systems)
36 #(set! output-count 1)
37
38 origScore = \score {
39   \relative c' {
40     \set Staff.instrumentName = #"bla"
41     c1
42     d1
43     \grace c16 e1
44     \key d \major
45     f1 \break
46     \clef bass
47     g,1
48     fis1
49   }
50 }
51
52 \book {
53   \score {
54     \origScore
55     \layout {
56       % Each clip-region is a (START . END) pair
57       % where both are rhythmic-locations.
58       
59       % (make-rhythmic-locations BAR-NUMBER NUM DEN)
60       % means NUM/DEN whole-notes into bar numbered BAR-NUMBER
61
62       clip-regions = #(list
63       (cons
64        (make-rhythmic-location 2 0 1)
65        (make-rhythmic-location 4 0 1))
66       
67       (cons
68        (make-rhythmic-location 0 0 1)
69        (make-rhythmic-location 4 0 1))
70
71       (cons
72        (make-rhythmic-location 0 0 1)
73        (make-rhythmic-location 6 0 1))
74       )
75     }
76   }
77 }
78
79 #(set! output-count 0)
80 #(ly:set-option 'clip-systems #f)
81
82 \book {
83   \score { \origScore }
84   \markup { \bold \fontsize #6 clips }
85   \score {
86     \lyrics {
87       \markup { from-2.0.1-to-4.0.1-clip.eps }
88       \markup {
89         \epsfile #X #30.0 #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps"
90                             (ly:parser-output-name parser)) }
91     }
92   }
93 }