Manual
Driving Hey Listen's analysis engine
One engine, two programmatic surfaces — the MCP server and the batch CLI. Analyzers
(and the CLI analyze / compare / synth) return the same envelope: effective
window / params / options, a canonical summary, and a result shaped by the
requested mode. The filter + synth graphs have their own GraphSpec/DOT form — see
graphs.md.
This file is a router. Read the file for the surface you’re using:
| File | Covers |
|---|---|
mcp.md |
MCP server: bridge vs headless, tools, workflow, projects/tabs/compare/annotations, export. |
cli.md |
Batch CLI: analyze / nodes / synth / compare / project / annotations. |
analyzers.md |
Every analyzer: result family, options, usage hint. |
graphs.md |
Filter + synth graphs: node catalog, GraphSpec/DOT, subsystems, snoop, sound design. |
You should not need the Hey Listen source — the MCP tool list + get_state + this skill
are the surface.
MCP tools vs the CLI — read this first
Drive Hey Listen with MCP tool calls — the tools in your tool list (run_analysis,
open_tool, set_analysis_window, get_state, set_shared_params, …). Call them
directly.
The batch CLI (hey-listen-cli …) is a separate shell binary, run from a terminal
for headless batch/CI. It is not an MCP tool: don’t try to “call” it, and don’t paste CLI
command text into your reply instead of acting. You never need the CLI to drive an open
project — if a project is open in the app, use the MCP tools.
Pick an interface
| Need | Use |
|---|---|
| Drive the live window; tabs/UI follow | MCP bridge |
| Lay analyzers out as a grid (not just tabs) | MCP bridge — open_tool { position }, app-only |
| Analyze files, nothing open | MCP headless (auto-fallback) |
Build a .heyl (source, setup, tabs, annotations) |
MCP headless save_project, or CLI project |
| Compare two projects | MCP compare_analysis, or CLI compare |
| Bulk-analyze files (shell/CI) | Batch CLI (run in a terminal) |
Read/edit annotations in a saved .heyl |
CLI annotations (run in a terminal) |
Cheapest-first rule
Every first call is summaryOnly: true. Answer from summary.text/items, then escalate
only if you need more:
summary → compact (default; noteMetrics.bounds segments without arrays) → full,
and then always includeData + maxPoints + axis: "compact"
Workflow
get_state— once: source shape, window, params, server mode (bridge/headless).list_analyzers— pick tools.get_analyzer { id }only for the tools you’ll run (option ranges,decimatable, summary keys). Use exact ids.- Set shared window/params once (
set_analysis_window/set_shared_params), per-tool options withset_tool_options. Inlinerun_analysisoverrides apply to one call only withtransient: true; otherwise they are written back. run_analysis { tool, summaryOnly: true }— always first.display: falsecomputes without opening a tab (defaulttrue).- Escalate only if the summary doesn’t answer (see Result modes).
- Mutating tools (
open_tool/close_tool/set_*/create_annotation) are read-modify-write — call them sequentially, never in parallel. - Report the numbers you got, the window/annotation you set, and any tool friction — nothing else.
Result modes
Every call carries summary (one-line text + labelled items, identical in every mode),
the effective window/params/options, and result:
| Mode | MCP | CLI | result |
|---|---|---|---|
| summary | summaryOnly: true |
--summary |
omitted |
| compact (default) | — | — | structural stats |
| full | includeData: true |
--full |
raw arrays |
summaryOnly⇎includeData(--summary⇎--full).- Compact is structural per family: matrices/spectrograms keep dims + peak location; series
become stats (with
nullsfor gaps,hopto map index→time); events/notes keep counts + a 5-record preview.noteMetricsalso returnsbounds(every span) — segment without a full result. maxPoints: Nthins a full result family-aware (never dropsnoteMetrics/onsetsevents); checkdecimatablefirst.axis: "compact"replaces atimesarray with{ start, hop, length, end }.
Gotchas
-
frameRmsis the sub-millisecond envelope — and window-capped.frameMs/hopMsgo to 0.05 ms, but the result caps at 8192 frames and widens the hop to fit. A long window coarsens (10 s → ~1.2 ms); a short window (≤ ~0.37 s) reaches the 2-sample hop (45 µs). For sample-accurate loop seams, use a short window and read the reportedhopSize/frameSize. -
Perception analyzers read ~0 until calibrated.
loudness,specificLoudness,sharpness,roughness,fluctuationStrength,tonality,maskingtakecalibrationDbSpl(0 = uncalibrated → ~0). Set it (e.g.100) for absolute values; defaults are mixed across tools (checkget_state.toolOptions). Summarize with level-gated medians, not min/max (they land on silent frames). -
channel(default 0) picks the analyzed channel; the louder channel varies per instant. Check both channels — for seams (level) and for brightness claims (a “brightest” readout can be a panned-channel artifact). -
hopis a fraction offftSize, not samples (0.25= 75% overlap;1= none). -
A
0can mean “not applicable”.temporeportsonsets 0andonsetsreportstempo 0— fields a tool doesn’t produce read as0, not “none”.