Nodes/ComfyTV/Score Editor
ComfyUI Node

Score Editor

A Piano Roll That Lives on the Canvas (No MusicXML Required)

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

Writing music by hand-typing XML is a special kind of torture, and ComfyTV's answer is the Score Editor: a full piano roll rendered right inside the node body. Draw notes with your mouse, audition the result, and the stage hands back a proper MusicXML score that plugs straight into the rest of the music chain. It's the "I can hum it, I can't type it" node, and it's the one I'd point a total beginner at first - no format knowledge required, just drag and drop on the grid.

Under ComfyTV/Music, the editor works the way you'd want a small DAW-ish roll to: draw mode (press and drag out a note), select mode (marquee, move, resize), and step input that mimics MuseScore - A–G enters pitches, 7–2 picks durations, . dots, 0/space rests, and the cursor advances automatically. Typing a melody this way is an order of magnitude faster than clicking. It supports up to four parts, each with its own instrument (a GM program written into the score, which Score Synth picks up automatically) or flagged as a drum part, with playback to audition the draft in-editor before you commit a Run.

Inputs and the flow

The surface is almost invisible: notes_json is the piano-roll state (hidden, driven by the editor) and the optional score input is the important bit - an upstream score (LLM-written, downloaded from MuseScore.com, or straight out of the Score stage) can be imported into the roll for editing. That's the killer workflow: LLM writes a draft → import into the roll → fix the melody by hand → export. The single output, score (COMFYTV_TEXT), is standard MusicXML - wire it to the Score stage if you want it engraved, or straight into Score Performer → Score Synth for actual audio.

If you Run it empty you get the node's own blunt error: "Score Editor: the piano roll is empty - draw some notes (or import the wired score first)." Fair.

Install

Part of ComfyTV:

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

Restart ComfyUI, find it under ComfyTV → Music; or search "ComfyTV" in ComfyUI Manager. On ComfyUI Desktop/macOS, clone into the running instance's absolute custom_nodes path (see the startup log) and restart the backend fully - and check you don't have a nested ComfyTV/ComfyTV/ folder. This stage is pure frontend + music parsing: no models, no extra deps.

Troubleshooting

  • Imported score looks wrong in the roll. The parser follows MuseScore/OSMD semantics and tolerates sloppy converted files, but heavily ornamented or layout-broken scores can misbehave - import, check, fix by hand.
  • Notes play but the exported file won't open elsewhere. Export MusicXML from a tool that round-trips it through a proper editor first; this node writes what you drew, no guarantees about every downstream consumer.
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.
notes_jsonSTRING
scoreoptCOMFYTV_TEXT

Outputs (1)

NameTypeDescription
scoreCOMFYTV_TEXT