Clip systems

Revision as of 22:38, 26 October 2025 by Jean Abou Samra (talk | contribs) (Import snippet from LSR)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This code shows how to clip (extract) snippets from a full score.

This file needs to be run separately with -dclip-systems; the snippets page may not adequately show the results. The result will be files named base-from-start-to-end[-count].eps.

If system starts and ends are included, they include extents of the System grob, e.g., instrument names.

Grace notes at the end point of the region are not included.

Regions can span multiple systems. In this case, multiple EPS files are generated.

LilyPond rendering error

LilyPond log:
Running as unit: run-p29574-i29575.service
Changing working directory to: `/tmp/lilywiki-tmp5c82d22314'
Processing `/tmp/lilywiki-tmp5c82d22314/file.ly'
Parsing...
Interpreting music...
Preprocessing graphical objects...
Finding the ideal number of pages...
Fitting music on 1 page...
Drawing systems...
Layout output to `file-1.svg'...
Layout output to `file-1-1.eps'...
warning: Cairo context status 'error creating or writing to a temporary file'
warning: Cairo surface status 'error creating or writing to a temporary file'
Layout output to `file-1-from-2.0.1-to-4.0.1-clip.eps'...
warning: Cairo context status 'error creating or writing to a temporary file'
warning: Cairo surface status 'error creating or writing to a temporary file'
Layout output to `file-1-from-2.0.1-to-4.0.1-clip.svg'...
Layout output to `file-1-from-2.0.1-to-4.0.1-clip.pdf'...
Layout output to `file-1-from-0.0.1-to-4.0.1-clip.eps'...
warning: Cairo context status 'error creating or writing to a temporary file'
warning: Cairo surface status 'error creating or writing to a temporary file'
Layout output to `file-1-from-0.0.1-to-4.0.1-clip.svg'...
Layout output to `file-1-from-0.0.1-to-4.0.1-clip.pdf'...
Layout output to `file-1-from-0.0.1-to-6.0.1-clip.eps'...
warning: Cairo context status 'error creating or writing to a temporary file'
warning: Cairo surface status 'error creating or writing to a temporary file'
Layout output to `file-1-from-0.0.1-to-6.0.1-clip.svg'...
Layout output to `file-1-from-0.0.1-to-6.0.1-clip.pdf'...
Layout output to `file-1-from-0.0.1-to-6.0.1-clip-1.eps'...
warning: Cairo context status 'error creating or writing to a temporary file'
warning: Cairo surface status 'error creating or writing to a temporary file'
Layout output to `file-1-from-0.0.1-to-6.0.1-clip-1.svg'...
Layout output to `file-1-from-0.0.1-to-6.0.1-clip-1.pdf'...
Interpreting music...
Preprocessing graphical objects...
Interpreting music...
Preprocessing graphical objects...ERROR: In procedure list-ref:
In procedure list-ref: Wrong type argument in position 1: #f