eq_compare
Compare two headphones band-by-band for sound signature analysis using frequency response measurements and parametric EQ profiles.
Instructions
Compare two headphones band-by-band with sound signature analysis.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name1 | Yes | First model name | |
| name2 | Yes | Second model name |
Implementation Reference
- autoeq_mcp.py:748-773 (handler)The handler function `eq_compare` implements the comparison of two headphones. It uses `_find_headphone` to locate the headphone records in the database and `format_comparison` to generate the comparison report.
name="eq_compare", annotations={ "title": "Compare headphones", "readOnlyHint": True, "destructiveHint": False, "idempotentHint": True, "openWorldHint": False, }, ) async def eq_compare( name1: str = Field(..., description="First model name"), name2: str = Field(..., description="Second model name"), ) -> str: """Compare two headphones band-by-band with sound signature analysis.""" conn = get_db() hp1 = _find_headphone(conn, name1) hp2 = _find_headphone(conn, name2) conn.close() if not hp1: return f"'{name1}' not found." if not hp2: return f"'{name2}' not found." return format_comparison(hp1, hp2) - autoeq_mcp.py:533-563 (helper)The helper function `format_comparison` is responsible for generating the text report comparing two headphone records.
def format_comparison(row1, row2) -> str: lines = [] lines.append(f"# Comparison: {row1['name']} vs {row2['name']}") lines.append(f" Source: {row1['source']} vs {row2['source']}") if row1["score"] or row2["score"]: s1 = f"{row1['score']}" if row1["score"] else "N/A" s2 = f"{row2['score']}" if row2["score"] else "N/A" lines.append(f" Harman score: {s1} vs {s2}") lines.append(f" Signature: {row1['signature'] or 'N/A'} vs {row2['signature'] or 'N/A'}") lines.append(f"\n## Per-band comparison (deviation from target, dB)") lines.append(f" {'Band':<25} {'Model 1':>8} {'Model 2':>8} {'Diff':>8}") lines.append(f" {'─'*25} {'─'*8} {'─'*8} {'─'*8}") for band, label in BAND_LABELS.items(): col = f"{band}_avg" v1 = row1[col] v2 = row2[col] if v1 is not None and v2 is not None: diff = v1 - v2 lines.append(f" {label:<25} {v1:>+8.1f} {v2:>+8.1f} {diff:>+8.1f}") else: lines.append(f" {label:<25} {'N/A':>8} {'N/A':>8} {'N/A':>8}") lines.append("\n## Summary") for row in [row1, row2]: sig = row["signature"] or "unclassified" lines.append(f"- **{row['name']}**: {sig}") return "\n".join(lines)