r/musicprogramming • u/ntx4score • 18h ago
A new JSON-based format for musical scores
github.comHello everyone!
I’ve spent some time working on NTX 4 — a plain-text, JSON-based score format designed to be easily read by humans and, more importantly, generated by Large Language Models.
The Problem:
MusicXML is too verbose and consumes too many tokens. ABC notation is great for single melodies, but LLMs often get confused and break when handling complex multi-track polyphony.
The Solution:
NTX 4 wraps the track structure in strict JSON (perfect for structured outputs/JSON mode) while keeping the notes inside compact strings (e.g., [E2,B2,E3]:q for chords).
- Pure Python: The reference compiler uses only the standard library (Python 3.9+, no pip required).
- Production Ready: Converts directly to Standard MIDI and MusicXML 4.0, so you can drop it into any DAW or notation editor.
- LLM Prompt Included: Features a step-by-step assembly workflow for LLM composers.
Open-source (MIT/CC0).