Track pitch (f0) and notes
audio_pitchTracks monophonic pitch with YIN or pYIN, segments notes, and reports cents deviation from equal temperament, a key's scale, or a MIDI melody for intonation and tuning checks.
Instructions
Tracks the fundamental frequency of a monophonic voice or instrument with pYIN or YIN, segments it into notes, estimates the tuning offset, and reports each note's deviation in cents from equal temperament, from a key's scale or from the notes of a MIDI file; note_pitch_detail splits each note into center, drift and vibrato. Use it for intonation checks, singing accuracy, tuning (A=440?) and extracting a melody line. Do not use it for chords or polyphonic music (audio_analyze, audio_transcribe) or to correct pitch (audio_vocal). pYIN is limited to 15 minutes of audio; pass 'range' for longer files. Example: {"path": "vocal.wav", "reference": {"key": "A minor"}, "resolution": "medium"}.
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": {
"path": "<path>"
},
"name": "audio_pitch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Audio file with a monophonic voice or instrument. | |
| limit | No | Maximum notes to return, 1-1000. | |
| range | No | Analyze only this window ({start_sec, end_sec}, in seconds); times in the result stay on the file's own timeline. Omit for the whole file. | |
| detail | No | 'concise' returns the summary and the most useful fields; 'full' returns all. | concise |
| method | No | pyin: probabilistic, robust, slower (length-limited); yin: fast, noisier. | pyin |
| offset | No | First note to return; past the end returns an empty list and its total. | |
| f0_max_hz | No | Highest pitch to track, in Hz. | |
| f0_min_hz | No | Lowest pitch to track, in Hz. | |
| reference | No | Report each note's deviation in cents against a key's scale ({key}) or against the notes of a MIDI file ({midi, track}). Omit to compare with equal temperament only. | |
| resolution | No | Time-series density: none returns summary statistics only; coarse 0.5, medium 1 and fine 4 points per second return a list of points with time_sec and the measured value. Series are in Hz. | none |
| note_pitch_detail | No | Split each note's pitch into its center, slow drift and vibrato: adds center_hz, drift_range_cents and vibrato_extent_cents to every note. |