Compare audio files
audio_compareCompares 2-8 audio files for loudness, tonal balance, tempo and key, and reports differences, delay and null residual against the first file; also matches a mix to a reference track.
Instructions
Compares 2 to 8 audio files: loudness (LUFS, true peak), band balance, tempo and key per file, then the differences against the first file, the time offset between them and a null residual (what is left after matching loudness and aligning the delay, so a value near silence means the files are the same audio). In reference mode it takes exactly two files and runs the full reference analysis (loudness match, tonal balance, match-EQ curve, delay) of the second against the first, as when checking a mix against a reference track or an original against a mastered copy, and can write a level-matched blend of the two (write_ab) for listening. Mode align gives the anchors that place a take under a reference, and mode similarity shows how well the second file matches each stretch of the first; both read chroma, so pitch content only. Do not use it for one file (audio_info, audio_loudness) or to change anything (audio_master matches a reference). Example: {"paths": ["reference.wav", "mix.wav"], "mode": "reference"}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"paths": "<paths>"
},
"name": "audio_compare"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'summary': meters, band balance, tempo and key per file plus differences, time offset and null residual against the first file. 'reference': exactly two files; runs the five reference pair analyses (loudness match, tonal balance, log-band balance, match-EQ curve, delay) of the second file against the first. 'align': exactly two files; anchors that place the second (a take) under the first one's timeline, from their chroma. 'similarity': exactly two files; how well each stretch of the first file is matched by the second, from chroma (pitch content only, not timbre). | summary |
| paths | Yes | 2 to 8 audio files. In every mode the first file is the reference the others are measured against. | |
| range | No | Analyze only this window ({start_sec, end_sec}, in seconds); an end_sec past the file length is clipped. Omit for the whole file. The same window is cut from every file. | |
| detail | No | 'concise' returns the summary and the most useful fields; 'full' returns all. | concise |
| write_ab | No | With mode reference: also write a loudness-matched blend of the two files, for listening to them against each other (path in 'files'). | |
| ab_mix_ratio | No | With write_ab: share of the reference (the first file) in the blend; 0 is the second file alone and 1 the reference alone. | |
| max_offset_sec | No | Largest time offset between the files that the offset search looks for, in seconds (0 to 60). A larger offset than this is reported as 0. |