create_midi_track
Add a MIDI track to your Ableton Live session for composing melodies, chords, and drum patterns. Specify the track position to organize your musical arrangement.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No |
Implementation Reference
- MCP_Server/server.py:273-281 (handler)The main handler function for the MCP tool 'create_midi_track'. It connects to the Ableton remote script and sends the create_midi_track command with the specified index (default -1). Returns a success message with the new track name or 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)}"