ComfyUI Node

Score

ComfyUI Finally Speaks Sheet Music

By jtydhr88·Created 3 months ago·Updated about 16 hours ago· 725
Score
  • text
  • score
force_run_token0
project_id
parent_output_id0
musicxml

ComfyUI's audio story used to stop at "make a beat." Then ComfyTV went and built a whole symbolic-music lane, and Score is the front door: a node whose entire job is to hold a piece of music as data. You feed it MusicXML - the standard interchange format MuseScore, Sibelius, and Finale all export - and it hands back a score, ready for the rest of the music chain (Score Editor → Score Performer → Score Synth → mixing).

It lives under ComfyTV/Music, and it's the rare node in this pack that's genuinely beginner-friendly because it has exactly one real input. The musicxml field takes the raw XML. Better: because the parser is deliberately forgiving, you can paste an entire AI-generated blob - say, an LLM's answer that wraps the actual <score-partwise>…</score-partwise> block in prose - and it auto-extracts the score from the surrounding text. The error message tells the story: "Score needs MusicXML - paste it or wire a text input (e.g. from an LLM Text stage)."

That text input is the interesting part. It's a COMFYTV_TEXT port, so you can wire a Text/LLM stage straight in - the whole "write me an 8-bar C-major piano solo in MusicXML" prompt-to-score flow works as pure graph, no copy-paste. The optional input means the stage plays two roles: a paste-target for downloaded scores and a downstream consumer for generated ones.

Where it sits in the chain

The music pipeline is composition → performance → synthesis. Score is step one: notes as structure, no sound yet. Its score output (COMFYTV_TEXT) feeds Score Performer for a humanized MIDI performance, or straight into an engraving view if you just want to look at it. It doesn't synthesize anything on its own - wire it forward, that's the design.

Install

Score comes with the whole ComfyTV pack:

cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV

Restart ComfyUI and look under ComfyTV → Music; ComfyUI Manager users search "ComfyTV". The usual Desktop/macOS caution applies: clone into the running instance's custom_nodes (path from the startup log, fix any nested ComfyTV/ComfyTV/) and fully restart the backend. No models, no extra Python deps - this stage is pure XML parsing.

Common issues

  • "Score needs MusicXML" - you ran it with nothing wired. Paste XML or connect a text source.
  • LLM output won't parse. The extractor looks for the <score-partwise> block; if the model wrapped it in markdown code fences, that usually still works, but if it mangled the tags you're better off regenerating the answer than hand-repairing XML.
  • Score parses but sounds wrong later. Structure errors surface downstream in Performer/Synth, not here - this node only guarantees the score loaded.
CategoryComfyTV/Music

Inputs (5)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
musicxmlSTRING
textoptCOMFYTV_TEXT

Outputs (1)

NameTypeDescription
scoreCOMFYTV_TEXT