compare_spectrum
Compare reference and candidate audio on a shared beat grid to reveal missing or excess level per band or semitone over time, separating timbre gaps from level moves.
Instructions
Compare reference and candidate on one beat grid, by band or semitone, over time.
Each file is placed through its own tempo map, so the difference shows what is
missing (positive dB) or too much (negative dB) at each beat and frequency.
Each section (a bar by default, or given beats or seconds) is first matched on
K-weighted loudness where both files sound, so sound and level come apart: per
section, sound_difference_db is the timbre gap at equal loudness and
level_difference_db the fader or automation move; true peak is reported only.
Also: regions ranked by area, attack positions and widths, and an offset estimate
that reveals plugin latency Live does not report. Track Delay is not in the
Object Model, so a needed correction is a request to the user.
Poll get_audio_job; read regions, sections and attacks with get_audio_report.
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": {
"reference_path": "<reference_path>",
"reference_anchors": "<reference_anchors>",
"output_dir": "<output_dir>",
"from_beat": "<from_beat>",
"to_beat": "<to_beat>"
},
"name": "compare_spectrum"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| low_hz | No | Lowest band centre. | |
| confirm | No | True carries the removal out. False changes nothing and returns a report of what the call would remove, which is how to look before committing to it. | |
| high_hz | No | Highest band centre. | |
| to_beat | Yes | Exclusive last song quarter beat. | |
| low_note | No | Lowest semitone row. | |
| sections | No | Explicit sections (a note, a phrase, a time window) instead. | |
| from_beat | Yes | First song quarter beat. | |
| high_note | No | Highest semitone row. | |
| window_ms | No | Analysis window; default 85 ms for bands, 170 ms for semitones. | |
| output_dir | Yes | Parent directory for a unique audio run. | |
| resolution | No | 1/12-octave bands, or semitone rows that name notes. | bands |
| max_regions | No | Regions kept. | |
| write_image | No | Also draw the three panels; needs the plot extra. | |
| threshold_db | No | Smallest difference that forms a region. | |
| beats_per_bar | No | Quarter beats per bar, for bar labels only. | |
| section_beats | No | Even section length in beats; default one bar. | |
| candidate_path | No | Candidate file when no capture job is given. | |
| capture_job_id | No | Succeeded capture_audio job; its host beats become the anchors. | |
| reference_path | Yes | Local mono/stereo audio file path (WAV/FLAC). | |
| steps_per_beat | No | Grid steps per beat. | |
| chain_offset_ms | No | Measured capture-chain lag; positive means candidate audio is late. | |
| candidate_anchors | No | Candidate tempo map, required with candidate_path. | |
| reference_anchors | Yes | Reference tempo map: file seconds against song quarter beats. | |
| extra_reference_paths | No | Further reference stems added to reference_path sample by sample, to compare a group with the sum of the stems it rebuilds rather than one of them. | |
| apply_estimated_offset | No | Also shift by the offset estimated from high-band attacks. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||