LSR: Update.
[lilypond.git] / input / lsr / clip-systems.ly
blob2f539eda9b8a10594803b8f98c2ba5920edd9559
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.
11 This file needs to be run separately with @code{-dclip-systems}; the
12 snippets page may not adequately show the results.
14 The result will be files named
15 @file{@var{base}-from-@var{start}-to-@var{end}[-@var{count}].eps}.
17 @itemize
18 @item
19 If system starts and ends are included, they include extents of the
20 System grob, e.g., instrument names.
22 @item
23 Grace notes at the end point of the region are not included.
25 @item
26 Regions can span multiple systems. In this case, multiple EPS files
27 are generated.
29 @end itemize
31 doctitle = "Clip systems"
32 } % begin verbatim
35 #(ly:set-option 'clip-systems)
36 #(set! output-count 1)
38 origScore = \score {
39 \relative c' {
40 \set Staff.instrumentName = #"bla"
43 \grace c16 e1
44 \key d \major
45 f1 \break
46 \clef bass
47 g,1
48 fis1
52 \book {
53 \score {
54 \origScore
55 \layout {
56 % Each clip-region is a (START . END) pair
57 % where both are rhythmic-locations.
59 % (make-rhythmic-locations BAR-NUMBER NUM DEN)
60 % means NUM/DEN whole-notes into bar numbered BAR-NUMBER
62 clip-regions = #(list
63 (cons
64 (make-rhythmic-location 2 0 1)
65 (make-rhythmic-location 4 0 1))
67 (cons
68 (make-rhythmic-location 0 0 1)
69 (make-rhythmic-location 4 0 1))
71 (cons
72 (make-rhythmic-location 0 0 1)
73 (make-rhythmic-location 6 0 1))
79 #(set! output-count 0)
80 #(ly:set-option 'clip-systems #f)
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)) }