spectrogram
Generate a mel spectrogram image from audio files (WAV, FLAC, mp3, ogg) for visual analysis of harmonic content, sweeps, or silence. Optionally annotate with beat, onset, and pitch detections.
Instructions
Render a mel spectrogram (or a tiled contact sheet covering the whole file) from a WAV, FLAC, mp3, or ogg file, for visual inspection of harmonic content, sweeps, or silence. The image comes back inline as MCP image content (base64 PNG) whenever it fits the size cap, so you can look at it directly without filesystem access; pass out_path to also (or instead) write the PNG to disk. Set annotate=true to draw what the analyzers heard onto the image — detected beats (orange ticks, top), onsets (cyan ticks, bottom), pitch segments (magenta lines) — and from_s/to_s to zoom into a time window. Use this when a numeric probe report isn't enough and you want to look at the audio.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_s | No | Optional: render only up to this time (seconds into the file). | |
| sheet | No | Tile the piece into a contact sheet instead of one long strip — useful for reviewing a whole piece in one vision call. Default false. Incompatible with annotate. | |
| from_s | No | Optional: render only from this time (seconds into the file). | |
| annotate | No | Draw analysis overlays (beat grid, onsets, pitch) on the image. Default false. | |
| out_path | No | Optional: also write the PNG here. Required in practice only when the image exceeds the inline size cap (the call says so if that happens). | |
| audio_path | Yes | Path to the input WAV, FLAC, mp3, or ogg. | |
| bars_per_tile | No | Time sections per tile when sheet is true. Default 8. |