import_midi_file
Import MIDI file notes into an Ableton clip, optionally inspecting tracks and channels first, then target a Session slot or Arrangement clip.
Instructions
Import the notes of a Standard MIDI File (.mid) into a clip. Without track_index, only describes the file (tracks, note counts, channels, length) so you can pick midi_track / channel first.
Session: an empty slot gets a new clip as long as the notes (rounded up to a 4-beat bar) or clip_length; an existing clip receives the notes (after clearing it when replace=True). Arrangement: the clip must exist (index from get_arrangement_clips). Times are in beats; the file's tempo is ignored.
Parameters:
file_path: Absolute path of the .mid file
track_index: Target MIDI track (omit to only describe the file)
clip_index: Session slot, or Arrangement clip index
midi_track: Track of the MIDI file to import (default: all, merged)
channel: MIDI channel to keep, 0-15 (default: all)
transpose: Semitones to add to every pitch
location: "session" (default) or "arrangement"
replace: Clear the target clip's notes first
clip_length: Length in beats of a newly created Session clip
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>"
},
"name": "import_midi_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | No | ||
| replace | No | ||
| location | No | session | |
| file_path | Yes | ||
| transpose | No | ||
| clip_index | No | ||
| midi_track | No | ||
| clip_length | No | ||
| track_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |