ferraus score to-json
Score as the agent-facing JSON model
Synopsis
ferraus score to-json <input> [options] [-o <output>]
What it does
Prints (or writes with -o) the score model: parts, staves, measures, voices, events with pitches (step, alter, octave, MIDI), durations in divisions per quarter, ties, tuplets, chord symbols, lyrics, sol-fa syllables, dynamics, articulations, repeats, and per-measure confidence. Edit it and convert back with score from-json.
Examples
Write the score model to a file
ferraus score to-json song.musicxml --pretty -o song.json
Notate a MIDI file and return the model in the result envelope
ferraus score to-json song.mid --json
Turn an ABC tune into compact score JSON for an agent to edit
ferraus score to-json tune.abc -o tune.json
Options
| Flag | Type | Default | Meaning |
|---|---|---|---|
--pretty | flag | — | Indent the JSON |
Global options
Every command also accepts the global options (-o, --json, --dry-run, --overwrite, --progress, ...). See Global options.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Processing failed |
| 2 | Usage or parameter error |
| 3 | Input missing or unreadable |
| 4 | Unsupported format or codec |
| 5 | Model not cached and downloads disabled |
| 6 | Model download or verification failed |
| 8 | Cancelled |
| 10 | Network error |
| 70 | Internal error (bug) |
Common mistakes
- Forgetting that outputs are never overwritten: pass
--overwriteor a new-opath when re-running.
For models
- MCP tool:
ferraus_score_to_json - Schema:
ferraus schema score to-json - Pipeline:
{ op: score to-json, args: { ... } }(flag names with_instead of-) - fx stage: no
{"command": "score to-json", "defaults": {}}