import_midi
Import Standard MIDI Files (format 0 or 1) into cochlea RON scores. Timing preserves exactly; General MIDI programs map to preset families with details returned for re-voicing.
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.
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. |