import_midi
Convert Standard MIDI files to cochlea RON scores for the render loop, preserving timing and mapping GM programs to presets; mapping guesses are returned so you can re-voice the score.
Instructions
Convert a Standard MIDI File (format 0 or 1) into a cochlea RON score. Timing imports exactly (SMF ticks become score ticks, tempo events become the tempo map); General MIDI programs map to rough preset families and channel-10 percussion to kick/snare/hat tracks — every mapping guess comes back in the response so you can re-voice the score afterwards. Use this to bring existing musical material into the compose→render→probe loop.
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": {
"midi_path": "<midi_path>",
"out_path": "<out_path>"
},
"name": "import_midi"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| out_path | Yes | Where to write the imported RON score. | |
| midi_path | Yes | Path to a .mid/.midi file (SMF format 0 or 1, metrical division). | |
| sample_rate | No | Sample rate for the imported score (MIDI files carry none). Default 48000. |