Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ad-si/lilynode
JavaScript wrapper for LilyPond
https://github.com/ad-si/lilynode
lilypond midi music music-notation node-js sheet-music
Last synced: about 1 month ago
JSON representation
JavaScript wrapper for LilyPond
- Host: GitHub
- URL: https://github.com/ad-si/lilynode
- Owner: ad-si
- Created: 2014-12-22T08:42:28.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2024-04-19T15:32:23.000Z (9 months ago)
- Last Synced: 2024-10-23T08:05:10.603Z (3 months ago)
- Topics: lilypond, midi, music, music-notation, node-js, sheet-music
- Language: TypeScript
- Homepage: https://npmjs.com/package/lilynode
- Size: 19.5 KB
- Stars: 24
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LilyNode
LilyNode is a Node.js wrapper for [LilyPond](https://lilypond.org/).
## Installation
```sh
npm install lilynode
```## Usage
```js
import fs from "fs/promises"
import { renderFile } from "lilynode"const pdf = await renderFile(
filePath, // Path to LilyPond file
{ format: "pdf" }, // Options object to configure the rendering
)await fs.writeFile("./test.pdf", pdf, { encoding: "binary" })
// or
const pdf = await render(
"\\score { …", // Content of a LilyPond file
{ format: "pdf" },
)
```### Available Options
`format: "midi" | "pdf" | "ps" | "png" | "svg"` - File format of output file \
Default value: `png``resolution: number` - Resolution of output in ppcm (only available for PNGs) \
Default value: `50``binaryPath: string` - Path to lilypond binary \
Default value: `lilypond`## Development
Check out the [makefile](./makefile) for all available commands.