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