Check your template
The template report reads a Cubase template you exported as a Track Archive. For each instrument and MIDI track it says what Grimoire thinks the track is. For each library the template uses, it says whether that library is on this Mac.
What it does:
- Lists every track, in order, with its folders.
- For instrument and MIDI tracks, suggests the patch the track most likely is, and says how sure it is.
- Lists the libraries those suggestions come from, each with a status.
What it does not do:
- It only reads. Nothing is written to the template, the Track Archive or Cubase. The command writes a file only when you ask it to, with
--out. - It does not open plugins or listen to anything. It matches by name only: the track’s name, its folders, and its expression map’s name when it has one.
- A suggestion is a guess from the name. It is never “the patch you used”.
Privacy
Section titled “Privacy”The report contains your track and folder names, and so does any conventions profile made from it. Treat it like the template itself.
patchctl template-report sends nothing off your Mac: no network calls, no analytics. The Claude tool is different: it returns the track, folder and library names to Claude, the AI model you are talking to, as part of your conversation, because that is what you asked Claude to read.
The report never copies file paths out of the archive. Cubase writes preset paths into a Track Archive, and those paths contain your macOS user name.
Export your template from Cubase
Section titled “Export your template from Cubase”- Open your template project in Cubase.
- Select all of its tracks: click the first track in the track list, then Shift-click the last. Include the folder tracks.
- Choose File > Export > Selected Tracks.
- Save the file. Cubase saves a Track Archive, an
.xmlfile.
You can try the report first on our sample Track Archive, a small made-up template with woodwind, brass and string folders.
Check it in Grimoire
Section titled “Check it in Grimoire”In My templates, switch to Cubase, click Add Track Archive… and pick the file. Grimoire checks it straight away and remembers it, so you can Check again later, filter the tracks, save a conventions profile or export the JSON report. See My templates.
Run the report in Terminal
Section titled “Run the report in Terminal”patchctl is inside the app, beside patchmcp. In Terminal:
'/Applications/Incantone Grimoire.app/Contents/Helpers/patchctl' template-report ~/Desktop/Template.xmlThe path has spaces, so keep the quotes. To type less, add an alias for this Terminal window:
alias patchctl='/Applications/Incantone Grimoire.app/Contents/Helpers/patchctl'patchctl template-report ~/Desktop/Template.xmlTo save the report as JSON instead of printing it:
patchctl template-report ~/Desktop/Template.xml --json --out ~/Desktop/template-report.json--out refuses to replace a file that exists. Add --force to replace it; the old file is kept beside it as a timestamped .bak.
The report uses your orchestra (orchestra/my-catalog.json in Grimoire’s data folder), so open Grimoire and let it find your libraries first. Without your orchestra, pass a catalog with --catalog.
| Option | What it does |
|---|---|
--json |
JSON instead of text |
--out PATH |
Writes the report to a file. --output works too |
--force |
Replaces an existing --out file, keeping a .bak |
--catalog PATH |
The catalog to match against. Default: your orchestra, else the catalog built into Grimoire |
--ownership PATH |
The file that says which patches you own. Default: your orchestra |
--no-ownership |
Reads no ownership at all: every library is unknown |
--delays PATH |
A delays CSV; owned patches that were measured show their delay |
--aliases PATH |
Your own names for instruments and articulations, as below |
--log PATH |
If the tool itself fails, saves a short trace there. Refused if the file exists, unless --force |
--max-bytes N, --max-elements N |
Raise the size limits (1 GiB, 5,000,000 elements) |
--quiet |
No “Reading the Track Archive…” line |
--verbose |
Warning details and timing on standard error |
The command exits with 0 when the report was made, 1 for any error listed below, and 2 for a fault in the tool itself.
For a fault, the Fix: line ends with a diagnostic id, eight letters and digits such as Diagnostic id 3f9a0c12. Run the command again with --log ~/Desktop/template-report-trace.json to save a trace with the same id. The trace says which step was reached and how many tracks were read; it holds no track names, no file paths and nothing from your files. Without --log, nothing is saved.
Teach it your names
Section titled “Teach it your names”If your template names things in a way the report doesn’t understand, an aliases file can teach it. It is the same file patchctl resolve --aliases takes: tab-separated rows in the format of Grimoire’s own lexicon, header first.
form role target alt_role alt_target implies sourcefl instrument flute my templatepatchctl template-report ~/Desktop/Template.xml --aliases ~/Desktop/my-names.tsvAn alias applies to every track whose name uses that word. It can only add words: a row that repeats a word Grimoire already knows is refused with aliasesInvalid. The Sources line names the aliases file.
Read the report
Section titled “Read the report”The first line is the headline. For the sample archive, matched against a small test catalog:
9 instrument/MIDI tracks: 8 recognised, 0 ambiguous, 1 unrecognised. 2 identified by expression map, 7 interpreted from names. 6 libraries suggested, 1 owned.It has three parts.
Coverage. Only instrument and MIDI tracks are matched; folder, audio, chord and other tracks are listed but not matched.
| Status | Meaning |
|---|---|
recognised |
One patch fits the name clearly |
ambiguous |
Several patches fit about equally; the report shows the alternatives |
unrecognised |
The name says too little, for example no instrument or family. The report gives the reason |
Evidence. Where the suggestion comes from.
| Evidence | Meaning |
|---|---|
identified |
The track has an expression map, and its name names the library, often the patch too |
interpreted |
No expression map: only the track’s name and its folders say what it is |
When an expression map names a different library from the suggestion, the track line says conflict: map <name>.
Libraries. How many libraries the suggestions use, and how many of them you own. Each library gets one status, taken from its best track:
| Library status | Meaning |
|---|---|
owned |
Your orchestra has this patch |
driveNotConnected |
You own it, but the drive it lives on isn’t connected |
unverified |
Found, but its player couldn’t be asked to confirm it |
foundUnrecognized |
Found on this Mac, in a library Grimoire’s catalog doesn’t know |
notOwned |
The ownership file says you don’t own it |
unknown |
No ownership data, or the ownership file doesn’t list it. This proves nothing either way |
Only notOwned means a library is missing. Your orchestra lists only what Grimoire found, so a library it didn’t find is unknown, not notOwned.
Without ownership data, the headline ends with “ownership cannot be determined with this catalog” instead of an owned count. The Sources line says which catalog, ownership file and delays file were used, and when the catalog was built.
Then come the libraries, and one line per track:
1 instrument Woodwinds / Oboe recognised → Synchron Woodwinds · Oboe (Staccato) · owned · identified · 42.5 ms 2 instrument Woodwinds / Synchron Woodwinds Flute recognised → Synchron Woodwinds · Flute (Long) · owned · interpreted 11 midi Chords OUT unrecognised (no instrument or family in the name) · interpretedA track whose name repeats gets a number, like Oboe [2].
The JSON report
Section titled “The JSON report”With --json, the same report is one JSON object. This is the sample archive again, matched against the test catalog with an ownership file and a delays file, cut down to two of its six libraries and two of its thirteen tracks:
{ "producer": { "name": "patchctl" }, "rows": [ { "alternates": [ { "library": "Synchron Woodwinds", "patch": "W/flute", "score": 3.5, "stateLabel": "Staccato" }, { "library": "Synchron Prime Edition", "patch": "P/clarinet", "score": 4, "stateLabel": "Staccato" } ], "colourIndex": 5, "evidence": "identified", "folderPath": [ "Woodwinds" ], "identityConflict": false, "inferences": [ "library from expression map Synchron Woodwinds Oboe Staccato: VSL Synchron Woodwinds", "articulation from expression map Synchron Woodwinds Oboe Staccato: staccato" ], "kind": "instrument", "libraryStatus": "owned", "measuredDelayMs": 42.5, "name": "Oboe", "notes": [], "observed": { "expressionMap": "Synchron Woodwinds Oboe Staccato", "library": "VSL Synchron Woodwinds" }, "ordinal": 1, "outputBus": { "observedId": 33 }, "rangeSource": "keymap 2026-10-02", "status": "recognised", "suggested": { "family": "woodwinds", "instrument": "oboe", "library": "Synchron Woodwinds", "patch": "W/oboe", "patchName": "Oboe", "score": 0, "state": "s001", "stateLabel": "Staccato" }, "trackIndex": 1 }, { "alternates": [], "evidence": "interpreted", "folderPath": [], "identityConflict": false, "inferences": [], "kind": "midi", "name": "Chords OUT", "notes": [], "ordinal": 1, "reason": "no instrument or family in the name", "status": "unrecognised", "trackIndex": 11 } ], "schemaVersion": 1, "sources": { "catalog": "catalog.json", "catalogBuilt": "2026-10-01T00:00:00Z", "delays": "delays.csv", "delaysNote": "measured delays from delays.csv", "ownership": "my-catalog.json", "ownershipNote": "ownership from my-catalog.json" }, "summary": { "automationTracks": 0, "byKind": { "chord": 1, "folder": 3, "instrument": 8, "midi": 1 }, "byStatus": { "ambiguous": 0, "recognised": 8, "unrecognised": 1 }, "evidence": { "identified": 2, "identifiedPercent": 22.2, "interpreted": 7, "interpretedPercent": 77.8 }, "headline": "9 instrument/MIDI tracks: 8 recognised, 0 ambiguous, 1 unrecognised. 2 identified by expression map, 7 interpreted from names. 6 libraries suggested, 1 owned.", "identityConflicts": 1, "libraries": [ { "byStatus": { "owned": 3 }, "library": "Synchron Woodwinds", "status": "owned", "tracks": 3 }, { "byStatus": { "unverified": 1 }, "library": "Synchron Brass", "status": "unverified", "tracks": 1 } ], "measuredTracks": 1, "ownershipDetermined": true, "resolvedTracks": 9, "tracks": 13, "warnings": [] }}Fields that don’t apply are left out. A folder track has at most trackIndex, kind, name, folderPath, ordinal, colourIndex and outputBus. measuredDelayMs and rangeSource appear only on an owned, measured track.
Report fields
Section titled “Report fields”The fields of schemaVersion 1. A type ending in ? means the field can be absent. Within version 1, fields are only ever added, never renamed or given new meanings.
| Field | Type | Meaning |
|---|---|---|
schemaVersion |
Int |
1 |
producer |
Producer? |
The program that wrote the report |
sources |
Sources |
Which files the report used, by file name |
summary |
Summary |
Totals and the headline |
rows |
[Row] |
Every track, in archive order |
producer.name |
String |
patchctl or patchmcp |
producer.version |
String? |
Not recorded yet: the tools don’t carry a version |
sources.catalog |
String |
The catalog matched against |
sources.catalogBuilt |
String? |
When that catalog was built, not when your Mac was scanned |
sources.ownership |
String? |
The ownership file, when one was read |
sources.ownershipNote |
String |
Where ownership came from, or why there was none |
sources.delays |
String? |
The delays file, when one was given |
sources.delaysNote |
String |
Where measured delays came from, or why there were none |
sources.aliases |
String? |
The aliases file, when one was given |
summary.headline |
String |
The first line of the text report |
summary.tracks |
Int |
Every track listed |
summary.byKind |
[String: Int] |
Tracks per kind |
summary.automationTracks |
Int |
Automation tracks: counted, not listed |
summary.warnings |
[Warning] |
See Warnings |
summary.resolvedTracks |
Int |
Instrument and MIDI tracks, the ones matched |
summary.byStatus |
[String: Int] |
Matched tracks per status: recognised, ambiguous, unrecognised |
summary.evidence |
EvidenceCounts |
Matched tracks per evidence |
summary.identityConflicts |
Int |
Tracks whose expression map names another library |
summary.measuredTracks |
Int |
Tracks with a measured delay |
summary.ownershipDetermined |
Bool |
False when no ownership data was read: every status is then unknown |
summary.libraries |
[LibrarySummary] |
The suggested libraries, in order of first appearance |
summary.warnings[].code |
String |
The warning’s code |
summary.warnings[].message |
String |
What it means for this archive |
summary.evidence.identified |
Int |
Tracks with an expression map |
summary.evidence.interpreted |
Int |
Tracks matched by name and folders only |
summary.evidence.identifiedPercent |
Double |
Of the matched tracks, one decimal place |
summary.evidence.interpretedPercent |
Double |
Of the matched tracks, one decimal place |
summary.libraries[].library |
String |
The library’s name |
summary.libraries[].status |
LibraryStatus |
Its status, from its best track |
summary.libraries[].tracks |
Int |
Tracks suggested from it |
summary.libraries[].byStatus |
[String: Int] |
Those tracks per status |
rows[].trackIndex |
Int |
Position in the archive, from 0 |
rows[].kind |
Kind |
folder, instrument, midi, audio, device, chord or other |
rows[].name |
String |
The track’s name |
rows[].folderPath |
[String] |
Its folders, outermost first |
rows[].ordinal |
Int |
2 for the second track with this name, and so on |
rows[].colourIndex |
Int? |
Cubase’s colour number |
rows[].outputBus |
OutputBus? |
The output as Cubase stores it |
rows[].evidence |
Evidence? |
identified or interpreted |
rows[].observed |
Observed? |
What the archive itself says: the expression map |
rows[].suggested |
Suggested? |
The patch the name most likely is |
rows[].status |
String? |
recognised, ambiguous or unrecognised |
rows[].reason |
String? |
Why a track is not recognised |
rows[].alternates |
[Alternate]? |
Up to two other candidates |
rows[].identityConflict |
Bool? |
True when the expression map names another library |
rows[].libraryStatus |
LibraryStatus? |
The suggested patch’s status |
rows[].measuredDelayMs |
Double? |
Its measured delay, in milliseconds |
rows[].rangeSource |
String? |
Where its playable key range came from, on a measured track |
rows[].notes |
[String]? |
Remarks, such as a conflict or a withheld delay |
rows[].inferences |
[String]? |
What was read from the name and the expression map |
rows[].outputBus.observedId |
Int |
A number, not a bus name |
rows[].observed.expressionMap |
String |
The expression map’s name |
rows[].observed.library |
String? |
The library that name names |
rows[].suggested.patch |
String |
The patch’s id in the catalog |
rows[].suggested.patchName |
String |
The patch’s name |
rows[].suggested.state |
String |
The articulation’s id |
rows[].suggested.stateLabel |
String |
The articulation’s name |
rows[].suggested.library |
String |
The patch’s library |
rows[].suggested.instrument |
String? |
The instrument, when known |
rows[].suggested.family |
String? |
Its family: strings, woodwinds and so on |
rows[].suggested.score |
Double |
How far the name is from the patch; lower is closer |
rows[].alternates[].patch |
String |
Another candidate’s id |
rows[].alternates[].stateLabel |
String |
Its articulation |
rows[].alternates[].library |
String |
Its library |
rows[].alternates[].score |
Double |
Its score |
Conventions profile fields (experimental)
Section titled “Conventions profile fields (experimental)”The report can also produce a conventions profile: for each instrument family, the folder, colour and output most of its tracks share. Add --profile-out PATH to write it. It is experimental, at schemaVersion 0, and may change without notice. Like the report, it contains your folder and track names.
Save it as grimoire-conventions.json beside a Track Archive you build, and Build uses it: each family becomes a rule with its folder and colour. The output bus is only reported, not applied, and the example names are not used. See Sessions: Build, which also shows the hand-written version 1 profile.
| Field | Type | Meaning |
|---|---|---|
schemaVersion |
Int |
0 |
rule |
SupportRule |
How much agreement a value needs to be recorded |
families |
[Family] |
One entry per instrument family, in order of first appearance |
absent |
[Absent] |
Each value not recorded, and why |
rule.minimumTracks |
Int |
At least this many tracks in the family (3) |
rule.minimumAgreement |
Double |
At least this share of them agreeing (0.8) |
families[].family |
String |
strings, woodwinds and so on |
families[].tracks |
Int |
The family’s counted tracks: recognised, with no identity conflict |
families[].skipped |
Int |
The family’s other matched tracks (ambiguous, or with an identity conflict), not counted |
families[].folderPath |
Field<[String]>? |
The folders most of them sit in |
families[].colourIndex |
Field<Int>? |
The colour most of them have |
families[].outputBus |
Field<Int>? |
The output most of them use |
families[].exampleNames |
[String] |
Up to three of their names, in archive order |
families[].folderPath.value |
[String] |
The value; colourIndex and outputBus have the same three fields |
families[].folderPath.support |
Int |
Tracks with that value |
families[].folderPath.agreement |
Double |
support over the family’s counted tracks |
absent[].family |
String |
The family |
absent[].field |
String |
folderPath, colourIndex or outputBus |
absent[].reason |
String |
Too few tracks, too little agreement, or no value in the archive |
Warnings
Section titled “Warnings”A warning means the report was made, but part of the archive was read through or skipped. Each prints as Warning <code>: <message>.
| Code | Message |
|---|---|
unverifiedVersion |
the archive’s format (root) has not been checked against this reader; results may be incomplete |
unresolvedReferences |
n track reference(s) point at nothing in the archive and were skipped |
referenceCycles |
n folder(s) contain themselves and were read once |
repeatedFolders |
n further reference(s) to an already listed folder were skipped |
foldersTooDeep |
n folder(s) are nested too deeply and their contents were skipped |
namesTruncated |
n name(s) were longer than the reader keeps and were shortened |
Ask Claude: template_report
Section titled “Ask Claude: template_report”With Claude connected, ask “check my template at ~/Desktop/Template.xml”. Claude uses the template_report tool. It reads the archive, writes nothing, and returns the headline, the libraries with their statuses, and up to 500 tracks that were not recognised. Unlike patchctl, it reads none of your orchestra unless asked: by default every library is unknown. Ask Claude to use your personal catalog (use_personal_catalog) to see what you own. The track, folder and library names are sent to Claude as part of your conversation.
The tool also takes:
| Argument | What it does |
|---|---|
aliases |
An aliases file, as for --aliases |
timeout_seconds |
Stops reading and matching after this many seconds, from 5 to 600. Default 120. Past it, the tool returns timedOut |
max_bytes, max_elements |
Lower the size limits. They can’t raise them; for a larger archive, use patchctl |
The first call with a catalog reads it; later calls reuse it until the file changes.
Errors
Section titled “Errors”Each error has a code, says what went wrong, and says how to fix it. patchctl prints Error: <code>: <what> and Fix: <fix>. Claude’s tool returns {error: {code, what, fix, sideEffects}}. Only outputFailed can leave something behind; sideEffects says partial when it did.
Reading the Track Archive
Section titled “Reading the Track Archive”notXML
Section titled “notXML”The file is not a readable XML document. Fix: In Cubase, select the template’s tracks and choose File > Export > Selected Tracks, then pick that .xml file.
notTrackArchive
Section titled “notTrackArchive”The file is XML but not a Cubase Track Archive. Fix: In Cubase, select the template’s tracks and choose File > Export > Selected Tracks, then pick that .xml file.
noTracks
Section titled “noTracks”The Track Archive contains no tracks. Fix: Select the tracks (not only automation) before exporting the Track Archive.
tooLarge
Section titled “tooLarge”The file, or a value inside it, is larger than the reader accepts. Fix: Export fewer tracks at a time, for example one folder per archive.
tooManyElements
Section titled “tooManyElements”The file has more elements than the reader accepts. Fix: Export fewer tracks at a time, for example one folder per archive.
unsafeDocument
Section titled “unsafeDocument”The file uses XML features the reader refuses for safety. Fix: Use the .xml file exactly as Cubase exported it, without editing or converting it.
unreadable.missing
Section titled “unreadable.missing”The file does not exist. Fix: Check the path, or export the Track Archive again.
unreadable.notRegularFile
Section titled “unreadable.notRegularFile”The path is not a regular file. Fix: Point at the exported .xml file itself, not a folder or device.
unreadable.wrongExtension
Section titled “unreadable.wrongExtension”The file is not an .xml file. Fix: Choose the Track Archive Cubase wrote; it ends in .xml.
unreadable.noPermission
Section titled “unreadable.noPermission”The file cannot be opened for reading. Fix: Give your user read access to the file, or copy it somewhere you can read.
cancelled
Section titled “cancelled”Reading was cancelled. Fix: Start the import again.
Catalog, ownership and delays
Section titled “Catalog, ownership and delays”catalogNotFound
Section titled “catalogNotFound”No capability catalog was given, and none was found. Fix: Pass –catalog <full-catalog.json or my-catalog.json>, or build your orchestra with patchctl ownership build.
catalogUnreadable
Section titled “catalogUnreadable”The catalog file cannot be read as a version 1 capability catalog. Fix: Pass the full-catalog.json or my-catalog.json file itself.
ownershipUnreadable
Section titled “ownershipUnreadable”The ownership file file cannot be read as a personal catalog. Fix: Pass my-catalog.json (patchctl ownership build writes it), or leave ownership out.
delaysUnreadable
Section titled “delaysUnreadable”The delays file file cannot be read as a delays CSV. Fix: Pass the delays.csv the measuring harness wrote, or leave delays out.
aliasesUnreadable
Section titled “aliasesUnreadable”The aliases file file cannot be read as UTF-8 text. Fix: Pass a readable lexicon.tsv-format file (the same file patchctl resolve –aliases takes), or leave aliases out.
aliasesInvalid
Section titled “aliasesInvalid”The aliases file file cannot be merged: the line and what is wrong with it, or the word it repeats. Fix: Fix that row: keep lexicon.tsv’s header and columns, and add only forms the bundled lexicon does not have.
Options and output
Section titled “Options and output”badArguments
Section titled “badArguments”An option the command refuses. The message says which:
--ownership and --no-ownership cannot be used together.--max-bytes must be positive.or--max-elements must be positive.- From Claude’s tool:
archive is required.,<name> must be a non-empty path.,use_personal_catalog must be true or false.,<name> must be a whole number from <low> to <high>.(fortimeout_seconds,max_bytesandmax_elements)
Fix: Check the flags with –help.
outputCollision
Section titled “outputCollision”The output path is one of the inputs or the other output. Fix: Choose an output path that is not an input file.
outputExists
Section titled “outputExists”The output path already exists. Fix: Pass –force to replace it (the old file is kept as a .bak), or choose another path.
outputUnwritable
Section titled “outputUnwritable”The output path cannot be written: its folder is missing or not writable, or it is a folder. Fix: Choose a path in an existing folder you can write to.
outputFailed
Section titled “outputFailed”Writing path failed (detail); side effects: none or partial. The detail is one of:
- the temporary file could not be written
- the existing file could not be moved to a .bak
- the new file could not be moved into place (when the old file could not be put back, the message says where it is)
- it appeared during the write, and an earlier output could not be rolled back
With partial, an earlier output or a .bak was left changed; the message names the file.
Fix: Check the folder’s free space and permissions, then run again.
timedOut
Section titled “timedOut”From Claude’s tool only: the report did not finish within n seconds. Fix: Retry with a larger timeout_seconds (at most 600), or run patchctl template-report, which has no time limit.
internalFailure
Section titled “internalFailure”Internal failure: a fault in the tool, not in your files (exit code 2). patchctl adds a diagnostic id to the fix, and with --log saves a trace (see Run the report in Terminal).
Fix: Run again; if it repeats, report it with the command you ran.