Skip to main content
Glama

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
NameRequiredDescriptionDefault
indexNo

Implementation Reference

  • 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)}"
  • 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)}"
  • 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" ]

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Milesy1/MCP-Ableton-API'

If you have feedback or need assistance with the MCP directory API, please join our Discord server