Transcribe audio to MIDI
audio_transcribeConverts pitched audio—such as melodies, bass lines, or piano parts—into notes and writes a Standard MIDI File, optionally aligned to a project tempo map and quantized.
Instructions
Converts pitched audio (a melody, a bass line, a piano part) into notes and writes a Standard MIDI File; the response gives the note count and the first rows of the note table with their times in seconds. With 'context' (a project file) the .mid carries that project's tempo map and time signatures, so it drops onto the project's grid with project_edit 'addMidiClip'; otherwise the tempo is tempo_bpm or derived from the audio. quantize_ppq snaps the notes. Use it for 'turn this recording into MIDI' or 'what notes are played here'. Do not use it for drums or full mixes (the result is unreliable), to read an existing MIDI file (midi_read) or to measure pitch frame by frame (audio_pitch). Example: {"path": "melody.wav", "context": "song.sonare.json", "quantize_ppq": 0.25}.
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_transcribe"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Input audio file path. | |
| range | No | Only transcribe this window ({start_sec, end_sec}, in seconds); notes keep the file's own times. Omit for the whole file. | |
| detail | No | 'concise' returns the summary and the most useful fields; 'full' returns all. | concise |
| output | No | The .mid file to write. Default: '<input stem>.transcribe.mid'. | |
| context | No | A project file (.sonare.json) whose tempo map and time signatures the .mid is written with, so it lines up with the project. Excludes tempo_bpm. | |
| dry_run | No | Report what would be written, with the planned path, only. | |
| overwrite | No | Replace an existing file at 'output' (default false). | |
| tempo_bpm | No | A constant tempo for the .mid (quarter notes per minute). Default: the context's tempo map, else one derived from the audio. | |
| polyphonic | No | Track several simultaneous notes (slower; for chords and piano). The default follows a single melodic line. | |
| quantize_ppq | No | Snap notes to this grid in quarter notes (0.25 = sixteenths). Default: off. |