API & MCP

Everything a person can do on Pitch Detector (note and cents from a recording), a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Pitch Detector (note and cents from a recording)

Finds the pitch of a voice or a single-note instrument in an audio file with the YIN algorithm: the median pitch with its nearest note and deviation in cents, the sequence of notes held for at least 60 ms, the lowest and highest pitch, a pitch-over-time chart and a CSV track of every 10 ms frame. The same detector as the pitch trainer in the Tonegrid app.

Inputs of Pitch Detector (note and cents from a recording)
FieldTypeDefaultDescription
file (required)file—Audio file. WAV directly, MP3, FLAC, Ogg, M4A and AIFF via ffmpeg. The first 30 seconds are analysed. One voice or one note at a time works best; chords and drums have no single pitch. Files are not kept.
thresholdnumber0.15Periodicity threshold. Lower = only very clean, periodic frames count as pitched (0.10–0.15 suits most recordings; raise it for breathy voices).
fminnumber60Lowest pitch searched. 60 Hz covers low male voices and bass guitar from B1; use 30 for 5-string bass.
fmaxnumber1500Highest pitch searched
a4number440Concert pitch A4

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "tonegrid-pitch-detect": { "type": "http", "url": "https://tonegridpitchdetect.usefulweb.app/mcp" }
  }
}