engrave_code
Convert inline LilyPond code into music notation images for quick visual iteration on musical ideas without creating source files.
Instructions
Engrave LilyPond code passed inline, without needing a source file on disk. Useful for iterating on a musical idea: engrave, read the preview PNG, adjust, repeat. For anything worth keeping, write a .ly file and use engrave_file instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | LilyPond source code, e.g. '\version "2.26.0" { c\' e\' g\' }' | |
| crop | No | Crop assets to the music itself (required for EPS) | |
| name | No | Basename for the generated assets | snippet |
| formats | No | Asset formats to generate; png is handy while iterating on a snippet | |
| preview | No | Attach the preview PNG to the result as an image, so the engraving is visible inline without reading a file. Turn off for batch runs. | |
| output_dir | No | Directory the generated assets are written to (created if missing) | build |
| include_dirs | No | Directories searched by \include, e.g. a shared settings library |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| errors | No | ||
| outputs | Yes | ||
| previewPng | No | Cropped PNG of the engraved music — read this file to inspect the result |