musictomidi_convert_to_midi
Uploads a local audio or video file and starts a MIDI conversion job, returning a job ID to monitor status and download results.
Instructions
Uploads a local audio or video file to MusicToMIDI and starts a MIDI conversion job. Returns at once, without waiting for the end of the job: jobId (give it to musictomidi_get_job to get the status, then to musictomidi_download_result to get the files) and status.
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": {
"file_path": "<file_path>",
"model": "<model>"
},
"name": "musictomidi_convert_to_midi"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | v1: Basic Pitch, one track, no drum track. v2: Basic Pitch architecture retrained, bigger, fewer wrong notes, one track, no drum track. v3: for full mixes, one MIDI track per instrument found, no drum track. multitrack_transformer: one transformer writes every instrument of the mix at once, no separation (dense arrangements). vocal_transformer: MIDI of the singing voice. drums_to_midi: one MIDI drum track on channel 10 (drums alone, or a song with options.isolate). multitrack: separates the stems listed in stems (vocals, drums, bass, guitar, piano, other), then converts each one with a model trained for that instrument, one track per stem; the separated stems come back too, in FLAC. Prices: musictomidi_get_prices. | |
| stems | No | multitrack (refused for the other models). Stems to separate from the audio, each one then converted to MIDI: vocals, drums, bass, guitar, piano, other. Not sent: all six. | |
| options | No | Conversion settings. A setting not sent keeps its default. | |
| file_path | Yes | Absolute path of the local file to send: audio (mp3, wav, ogg, opus, flac, m4a, aac, aiff…) or video (mp4, mov, webm, mkv, avi…, its audio track is used). Limits: 4 GB (a larger file is refused before it is sent), and 2 hours of audio (a longer audio makes the job fail with audio_too_long). | |
| endSeconds | No | End of the audio selection, in seconds, after startSeconds. Past the end of the file, the selection stops at the end of the file. | |
| startSeconds | No | Start of the audio selection, in seconds from the start of the file. Sent with endSeconds: only the selection is converted and paid; tempo, meter and key are still measured on the whole file. A selection that starts after the end of the file makes the job fail (invalid_request). | |
| Idempotency-Key | No | Optional. A code of your choice (8 to 255 characters) that protects against starting the same job twice. Call again with the same code, the same file and the same parameters, for example after a network error: the job already started is returned, the file is not sent again and nothing is billed twice. Use a new code for each new job. After a restart of this server, or 24 hours after the first call, the same code is refused (idempotency_conflict) instead of returning the job: no second job is started. |