システムをクリップする

このコードは、フルスコアから部分をクリップ (抽出) する方法を示しています。

このファイルは -dclip-systems を付加して個別に実行する必要があり、スニペットのページに示されている出力は結果を示しているものではありません。

出力されるファイルの名前は ‘base-from-start-to-end[-count].eps’ の形になります。

システムの始端や終端が含まれている場合は、System Grob の領域も出力に含まれます (例: 楽器名)。

クリップ領域の終端にある装飾音符は出力に含まれません。

クリップ領域は複数のシステムを含むことができます。この場合には、複数の EPS ファイルが出力されます。

#(set-default-paper-size "a6" 'landscape)
\layout {
  indent = 2.4\cm
}

#(ly:set-option 'clip-systems)
#(ly:set-option 'separate-page-formats "ps")
#(define output-suffix "1")

origScore = \new Staff \with { instrumentName = "Instrument" }
\relative c' {
  c1
  d1
  \grace c16 e1
  \key d \major
  f1 \break
  \clef bass
  g,1
  fis1
}

\book {
  \score {
    \origScore
    \layout {
      % Each clip-region is a (START . END) pair
      % where both are rhythmic locations.  Syntax:
      %
      %   (make-rhythmic-locations BAR-NUMBER NUM DEN)
      %
      % means NUM/DEN whole-notes into bar numbered BAR-NUMBER

      clip-regions = #(list (cons (make-rhythmic-location 2 0 1)
                                  (make-rhythmic-location 4 0 1))
                            (cons (make-rhythmic-location 0 0 1)
                                  (make-rhythmic-location 4 0 1))
                            (cons (make-rhythmic-location 0 0 1)
                                  (make-rhythmic-location 6 0 1)))
    }
  }
}

#(ly:set-option 'clip-systems #f)
#(ly:set-option 'separate-page-formats #f)
#(define output-suffix #f)

\book {
  \score { \origScore }
  \markup { \bold \fontsize #6 clips }
  \score {
    \lyrics {
      "from-2.0.1-to-4.0.1-clip.eps"
      \markup \epsfile #X #30.0
                       #(format #f "~a-1-from-2.0.1-to-4.0.1-clip.eps"
                                (ly:parser-output-name))
    }
  }
}
[image of music]

LilyPond snippets v2.25.32 (development-branch).