Sheet Music Renderer: ABC, MusicXML, LilyPond & MIDI to PDF avatar

Sheet Music Renderer: ABC, MusicXML, LilyPond & MIDI to PDF

Pricing

Pay per event

Go to Apify Store
Sheet Music Renderer: ABC, MusicXML, LilyPond & MIDI to PDF

Sheet Music Renderer: ABC, MusicXML, LilyPond & MIDI to PDF

Turn ABC notation, MusicXML, LilyPond, MEI, Humdrum or MIDI into sheet music (PDF, PNG or SVG pages), MIDI and MP3 audio. Transpose, change the page size or playback instrument, render whole tunebooks, and get errors with line numbers that people and AI agents can fix.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Jumble Mog

Jumble Mog

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

7 days ago

Last modified

Security

Limited permissions

Share

Turn music notation into sheet music and sound, without installing anything. Send ABC notation, MusicXML, LilyPond, MEI, Humdrum or a MIDI file, as text, a link or an upload, and get back sheet music as PDF, PNG or SVG pages, a MIDI file and MP3 or WAV audio. Transpose to any key, pick the playback instrument and tempo, render whole tunebooks, and get problems back with line and column so a person or an AI agent can fix the score. Many scores per run, pay per score, and scores that can't be read are free.

ABC notation for a two-part Ode to Joy, the sheet music and MP3 this Actor made from it, a Chopin mazurka engraved from Humdrum, and the JSON results for a rendered score and for a LilyPond score with a mistake

What it does

  • Reads the common notations: ABC (any number of voices, lyrics, chord symbols and tunes per file), MusicXML and compressed .mxl (as exported by MuseScore, Finale, Sibelius, Dorico, Noteflight and Flat), LilyPond (.ly, including projects with \include files), MEI, Humdrum **kern, and MIDI, which is turned into notation.
  • Makes sheet music: a PDF ready to print, or one PNG or SVG image per page for web pages, chat messages, worksheets and thumbnails. Titles, composers, part names, lyrics and chord symbols are engraved as in the score.
  • Makes it playable: a MIDI file and an MP3 or WAV recording played with a full General MIDI sound set, so you can hear what was written.
  • Transposes: by semitones (2, -3), by interval (M2, -m3, P5) or to a key (Bb, F#), for instance to make a part for B♭ clarinet or to fit a singer's range. The notation and the audio change together.
  • Playback options: choose one of 46 instruments (piano, violin, flute, guitar, choir, saxophones and more) and a practice tempo.
  • Layout options: A4 or US Letter, portrait or landscape, staff size from 30% to 300%, whole pages or pages cropped to the music, or all the music on one long line.
  • Errors you can act on: a LilyPond mistake comes back as {"file", "line", "column", "message", "source"}, for example main.ly:2:21: unknown escaped string: \foo (at: \relative c' { c4 d \foo e f }). ABC problems (unreadable characters, bars of the wrong length) are listed as warnings with their line and column, and the rest of the tune is still engraved.
  • The file straight from the API: the first file you ask for (the PDF by default) is also the run's OUTPUT, so the run-sync endpoint answers with the file itself, or with the errors as JSON.
  • Safe with untrusted scores: every engraver runs as an unprivileged user in a throwaway folder with a time limit, so LilyPond's built-in programming language can't reach anything else.

Who it's for

  • AI agents and LLM apps that compose or teach music. Language models write ABC notation well; this Actor turns it into a score to show and a recording to play, and its line-numbered feedback lets an agent correct its own notation.
  • Music teachers and students making exercises, worksheets, transposed parts and practice tracks.
  • Musicians and arrangers who need a quick PDF or MP3 from a MusicXML export, a folk tunebook or a LilyPond project, or a part in another key.
  • Developers and automation builders (n8n, Make, Zapier) who need music rendering in an app without running engravers on their own servers.

How to use it

  1. Paste a score into Score, add links in Links to scores, or upload files. The example is ABC notation for a two-part Ode to Joy with lyrics.
  2. Pick what to make (PDF, PNG, SVG, MIDI, MP3, WAV) and, if you like, a transposition, playback instrument, tempo, page size and layout.
  3. Click Start. Each score appears in the Output tab with links to its files, or with its errors.

You can also run it through the Apify API, on a schedule, or from Make, n8n, Zapier and other integrations.

How-to examples

How to convert ABC notation to sheet music (PDF) and MP3

{"notation": "X:1\nT:Ode to Joy\nM:4/4\nL:1/4\nK:D\nFFGA|AGFE|DDEF|F3/2E/2E2|", "outputs": ["pdf", "mp3"]}

Result: a printable PDF of the tune and an MP3 of it. Leave out outputs to get a PDF, PNG pages, a MIDI file and an MP3. MusicXML, LilyPond, MEI, Humdrum and MIDI files work the same way, as text, links or uploads.

How to transpose sheet music to another key

{"scores": [{"name": "in-c", "url": "https://example.com/tune.abc", "transpose": "-2"},
{"name": "for-clarinet", "url": "https://example.com/tune.abc", "transpose": "M2"}],
"outputs": ["pdf", "mp3"], "instrument": "flute"}

Result: one score down a whole step and one up a major second, for a B♭ clarinet part, each as a PDF and an MP3 played on flute. Transpose by semitones, by interval (M2, -m3, P5) or to a key (Bb).

How to render MusicXML from MuseScore or Finale as PNG pages

{"scoreUrls": ["https://example.com/scores/quartet.mxl"], "outputs": ["png"], "pageSize": "letter"}

Result: one PNG per page, for a web page, a worksheet or a chat message. Use svg for sharp images at any size.

How to let an AI agent write and play music

Add this Actor to the Apify MCP server with https://mcp.apify.com/?tools=jumblemog/sheet-music-renderer. Most models can write ABC notation, so the agent writes the tune, sends it in notation, and gives the user the PDF and MP3. Mistakes come back with their line and column, so the agent can fix them and try again.

FAQ

Which notations can it read? ABC, MusicXML and compressed .mxl, LilyPond, MEI, Humdrum, and MIDI files.

Do I need MuseScore or LilyPond installed? No. The engravers run in the cloud.

Can I choose the instrument and tempo of the audio? Yes: 46 instruments, such as piano, violin, flute, guitar, choir and saxophones, and any tempo for practice.

Can I get the PDF straight from the API? Yes. The first file you ask for is also the run's OUTPUT, so the run-sync endpoint answers with the file itself.

Does it work with Zapier, Make or n8n? Yes. Call the Actor with its Apify app or an HTTP request and pass the file links on.

Input

FieldWhat it does
notationOne score as text: ABC, MusicXML, LilyPond, MEI or Humdrum.
scoreUrlsLinks to score files (.abc, .musicxml, .xml, .mxl, .ly, .mei, .krn, .mid), GitHub file pages, Google Drive or Dropbox share links, or ZIP archives.
uploadsScore files or ZIP archives uploaded in the input form.
outputsAny of pdf, png, svg, midi, mp3, wav (default: PDF, PNG, MIDI and MP3).
transposeSemitones (2, -3), an interval (M2, -m3) or, for MusicXML, MEI, Humdrum and MIDI, a key (Bb).
instrumentPlayback instrument for the MIDI and audio, such as violin or alto-sax. Empty: as in the score.
tempoPlayback tempo in beats per minute. Empty: as in the score.
pageSizea4 (default), letter, a4-landscape or letter-landscape.
layoutpages (default), cropped (pages trimmed to the music) or single-line.
staffSizeSize of the music in percent (default 100).
ppiPNG resolution in pixels per inch (default 150).
inputFormatauto (default), abc, musicxml, lilypond, mei, humdrum or midi.
scoresMore scores: a list of notation strings, or objects with notation or url and optional name, inputFormat, transpose, instrument, tempo and mainFile.
mainFileThe main score inside ZIP archives. Empty: found automatically.
renderTimeoutSecsTime limit per score, 5 to 600 seconds (default 60).
maxScoresStop after this many scores (default 100).

Example: one tune in three keys, with audio on a flute:

{
"scores": [
{"name": "in-d", "url": "https://example.com/tune.abc"},
{"name": "in-c", "url": "https://example.com/tune.abc", "transpose": "-2"},
{"name": "in-e", "url": "https://example.com/tune.abc", "transpose": "M2"}
],
"outputs": ["pdf", "mp3"],
"instrument": "flute"
}

Output

Each score becomes one dataset item, and the files are saved in the run's key-value store:

{
"index": 1,
"name": "score",
"status": "ok",
"inputFormat": "abc",
"title": "Ode to Joy",
"composer": "Ludwig van Beethoven",
"pages": 1,
"durationSeconds": 16.0,
"error": null,
"errors": [],
"warnings": [],
"pdfUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/001-score.pdf?signature=...",
"imageUrls": ["https://api.apify.com/v2/key-value-stores/<store>/records/001-score-001.png?signature=..."],
"svgUrls": [],
"midiUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/001-score.mid?signature=...",
"mp3Url": "https://api.apify.com/v2/key-value-stores/<store>/records/001-score.mp3?signature=...",
"wavUrl": null,
"processingSeconds": 1.1
}

When a score can't be engraved, the item says where and why, and isn't billed:

{
"index": 2,
"status": "failed",
"inputFormat": "lilypond",
"error": "main.ly:2:21: unknown escaped string: `\\foo' (at: \\relative c' { c4 d \\foo e f | g1 })",
"errors": [{"file": "main.ly", "line": 2, "column": 21, "message": "unknown escaped string: `\\foo'",
"source": "\\relative c' { c4 d \\foo e f | g1 }"}]
}

Download your files within your plan's data retention period, or copy them to your own storage, because run storage expires.

Pricing

You pay per score rendered, at the price shown on this page, whatever outputs you pick and however many pages it has. Scores that can't be read are never charged. If you set a maximum cost per run, the Actor stops when the next score wouldn't fit.

Speed

Measured on Apify with the default 4 GB of memory, each with PDF, PNG, MIDI and MP3: the two-part Ode to Joy above took 1.6 seconds, a Bach chorale in MusicXML, transposed, 2 seconds, a two-page Chopin mazurka in Humdrum 4.8 seconds, a LilyPond minuet 4.7 seconds and a MIDI file turned into notation 4.1 seconds. Starting a run adds about 10 seconds (six scores took 34 seconds in all), so send many scores in one run when you can. Less memory makes runs slower but not cheaper per score.

Tips and limits

  • ABC is engraved with abcm2ps and played with abc2midi, the reference ABC tools, so voices (V:), lyrics (w:), chord symbols, decorations and %% directives work as in other ABC software. A file with several tunes (X: lines) gives every tune in the sheet music; the MIDI and audio play the first tune. Transposing ABC takes semitones or an interval.
  • LilyPond files keep their own layout, staff size and paper settings (only A4 or Letter is passed on), and transpose isn't applied to them; use \transpose in the score. To get MIDI and audio, put \midi { } inside \score. LilyPond 2.24 is installed.
  • MIDI files are turned into notation by quantizing to sixteenth notes and triplets, which suits MIDI exported from notation software or played to a click. Freely played MIDI gives busy notation, but its MIDI and audio stay exactly as played.
  • MusicXML, MEI and Humdrum are engraved with Verovio. Very large orchestral scores may need a longer time limit.
  • Files can be up to 100 MB (MIDI files up to 5 MB) and ZIP archives up to 2,000 files. Audio is made for music up to 30 minutes long.

For AI agents and developers

This Actor works with the Apify MCP server, so AI agents can call it as a tool: pass ABC (or another notation) in notation and read pdfUrl, imageUrls and mp3Url from the dataset item. If status is failed, errors says what to fix; if warnings lists ABC problems, fix those lines and call again. For a direct API call that waits for the result:

curl -X POST "https://api.apify.com/v2/acts/jumblemog~sheet-music-renderer/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"notation": "X:1\nT:Scale\nM:4/4\nL:1/4\nK:C\nCDEF|GABc|", "outputs": ["png", "mp3"]}'

To get the file itself as the response, call run-sync instead. It returns the run's OUTPUT, the first file you asked for (or the first score's errors as JSON):

curl -X POST "https://api.apify.com/v2/acts/jumblemog~sheet-music-renderer/run-sync?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"notation": "X:1\nT:Scale\nM:4/4\nL:1/4\nK:C\nCDEF|GABc|", "outputs": ["png"], "layout": "cropped"}' \
-o scale.png

Credits

Engraving by abcm2ps (LGPL-3.0), Verovio (LGPL-3.0) and GNU LilyPond (GPL-3.0); ABC playback by abcMIDI (GPL-2.0); MIDI import by music21 (BSD-3-Clause); audio by FluidSynth (LGPL-2.1) with the FluidR3 General MIDI SoundFont (MIT) and LAME (LGPL). Each runs unmodified as a separate program or library.