create_midi_track
Add a MIDI track to your Ableton Live session for recording and editing musical notes. Specify the track position to organize your arrangement and build complete compositions through natural language commands.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No |
Implementation Reference
- MCP_Server/server.py:273-282 (handler)The primary MCP tool handler for 'create_midi_track'. It establishes a connection to the Ableton remote script and forwards the command with the optional track index parameter (defaults to -1, appending to the end). Returns a success message with the new track's name or an error.@mcp.tool() def create_midi_track(ctx: Context, index: int = -1) -> str: try: ableton = get_ableton_connection() result = ableton.send_command("create_midi_track", {"index": index}) return f"Created new MIDI track: {result.get('name', 'unknown')}" except Exception as e: logger.error(f"Error creating MIDI track: {str(e)}") return f"Error creating MIDI track: {str(e)}"
- MCP_Server/server.py:273-282 (registration)The @mcp.tool() decorator registers this function as an MCP tool named 'create_midi_track' in the FastMCP server.@mcp.tool() def create_midi_track(ctx: Context, index: int = -1) -> str: try: ableton = get_ableton_connection() result = ableton.send_command("create_midi_track", {"index": index}) return f"Created new MIDI track: {result.get('name', 'unknown')}" except Exception as e: logger.error(f"Error creating MIDI track: {str(e)}") return f"Error creating MIDI track: {str(e)}"
- MCP_Server/server.py:104-110 (helper)Identifies 'create_midi_track' as a state-modifying command, applying extra timeout tolerance and delays when communicating with the Ableton remote script.is_modifying_command = command_type in [ "create_midi_track", "create_audio_track", "set_track_name", "create_clip", "add_notes_to_clip", "set_clip_name", "set_tempo", "fire_clip", "stop_clip", "set_device_parameter", "start_playback", "stop_playback", "load_instrument_or_effect", "load_browser_item" ]