s

scorify

@preview

Render professional sheet music directly in Typst documents.

v0.3.0
MIT

Package Information

Last Updated
Minimum Typst Version
0.14.0
Categories
visualizationcomponents
Disciplines
music

1. Get the package

Download the package using the TPIX CLI:

tpix get @preview/scorify:0.3.0

2. Import in your Typst file

Add this to your .typ file:

#import "@preview/scorify:0.3.0": *

Version History

0.3.00.14.0
b63e2892b59c...
0.2.00.14.0
16caeb5102a5...
0.1.10.14.0
ca9a5f991b23...

Scorify

Render sheet music directly inside Typst with a WASM-backed SVG renderer.

Full API and syntax documentation: docs/reference.md

Usage

Via Typst Package Manager

#import "@preview/scorify:0.3.0": score, melody

Compile normally:

typst compile your-file.typ

Font Setup

Scorify uses Leland by default. Leland is built directly into scorify_wasm.wasm, so the default setup does not require a system-installed music font or --font-path.

If you choose another supported SMuFL font with music-font, Typst must be able to find that font from your system fonts or from a directory passed with --font-path. If Typst cannot find it, compilation still runs, but Typst will warn about the missing font family.

Use music-font-metadata when you want to provide external SMuFL metadata explicitly, usually via json(...).

Supported Fonts

  • Leland (default, bundled in the WASM)
  • Bravura
  • Petaluma
  • Sebastian
  • Leipzig
  • Finale Ash
  • Finale Broadway
  • Finale Engraver
  • Finale Jazz
  • Finale Legacy
  • Finale Maestro

Example

#import "@preview/scorify:0.3.0": melody

#melody(
  title: "Scale",
  key: "C",
  time: "4/4",
  music: "c4 d e f | g a b c'",
)

Example: Grand Staff

#import "@preview/scorify:0.3.0": score

#score(
  title: "Ode to Joy",
  composer: "L. van Beethoven",
  key: "D",
  time: "4/4",
  staves: (
    (
      clef: "treble",
      brace-start: true,
      music: "f#4 g a b | a g f# e | d2 e2 | f#1",
    ),
    (
      clef: "bass",
      brace-end: true,
      music: "d,2 a, | d,2 a, | d,1 | a,1",
    ),
  ),
)

Notes

  • The library requires Typst 0.14.0+.
  • Alternate fonts may need metadata or spacing adjustments depending on the font.

License

MIT - see LICENSE.