# lilynode

> Node.js wrapper for LilyPond

Latest version **0.5.2** (published 2024-04-19) · ISC license · 0 weekly downloads

## Install

```sh
npm install lilynode
pnpm add lilynode
yarn add lilynode
bun add lilynode
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.5.2 |
| Published | 2024-04-19 |
| First published | 2014-12-22 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 31 |
| Author | Adrian Sieber |
| Maintainers | adius |
| Keywords | lilypond, midi, music-notation, music, sheet-music |

## Links

- npm: https://www.npmjs.com/package/lilynode
- Repository: https://github.com/ad-si/lilynode
- Issues: https://github.com/ad-si/lilynode/issues
- npm.io page: https://npm.io/package/lilynode

## Dependencies (1)

- [temp](https://npm.io/package/temp.md) ^0.9.4

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.5.2 (latest) — 2024-04-19
- 0.5.1 — 2024-04-19
- 0.5.0 — 2024-04-16
- 0.4.1 — 2015-04-06
- 0.4.0 — 2015-04-06
- 0.3.1 — 2014-12-23
- 0.3.0 — 2014-12-23
- 0.2.0 — 2014-12-22

## 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.

---
_Source: https://npm.io/package/lilynode · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
