Repository navigation
MusicXML Reader
The reader is the reverse direction: MusicXML → croma's Score → ABC (or
re-emitted MusicXML). It inverts croma's own writer and reads foreign
MusicXML dialects (abc2xml, MuseScore, Finale, Sibelius). It is a proven,
un-gated capability and ships in the default CLI build.
croma read score.musicxml --format abc # MusicXML -> ABC
croma read score.musicxml --format xml # re-emit MusicXML (the writer's inverse)
croma read score.musicxml --format dump # debug-print the reconstructed Score
croma musicxml2abc score.musicxml # = read --format abc| Gate | Result (10k corpus) |
|---|---|
Self-loop XML re-emission (write_musicxml(read_musicxml(xml))) |
9,935 / 9,935 |
| Foreign-dialect parity vs music21 | 98.50% |
The writer is the spec: the reader inverts croma's dialect exactly and never mirrors an abc2xml-ism. Foreign dialects are read gracefully (with diagnostics), never mimicked back into the writer.
The reader's only dependency is roxmltree, and it is opt-in:
-
croma-core(library) — the reader is behind themusicxml-readerfeature, so the default library build stays zero-dependency and crates.io-publishable. Enable it withcargo add croma-core --features musicxml-reader, then callread_musicxml(xml) -> ParseReport<Score>(Library-Usage#enabling-the-musicxml-reader). -
croma-cli(binary) — the reader is promoted (un-gated) and on by default, soroxmltreereaches the CLI binary. Acargo build -p croma-cli --no-default-featuresbuild omits the reader, the two subcommands, and the dependency.
Reader coverage, the foreign-dialect policy, the ABC-projection completion pass
(complete_score_for_abc), the reader → ABC structural round-trip (97.9%,
9,724 / 9,933 in-scope), and the adjudicated residual are documented in detail
in
docs/musicxml-reader.md.
See also: CLI-Usage · How-its-Proven · Conversion-Challenges (the lossy-intermediate round-trip cases and the deferred items).
croma — licensed under Apache-2.0.
Commercial use is allowed but must retain the attribution in
NOTICE (license §4); provided
as-is, without warranty or liability (§7–8).
Repository · crates.io · docs.rs · Issues · docs/
Start here
Use it
Capabilities
Why trust it
Help