stop_clip
Stops playback of a specific clip in Ableton Live by specifying the track and clip indices, enabling precise control in AI-assisted music production workflows.
Instructions
Stop playing a clip.
Parameters:
track_index: The index of the track containing the clip
clip_index: The index of the clip slot containing the clip
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip_index | Yes | ||
| track_index | Yes |
Implementation Reference
- MCP_Server/server.py:460-479 (handler)MCP tool handler for 'stop_clip'. Forwards the stop_clip command with track_index and clip_index parameters to the Ableton remote script via socket connection and returns a formatted success or error message.@mcp.tool() def stop_clip(ctx: Context, track_index: int, clip_index: int) -> str: """ Stop playing a clip. Parameters: - track_index: The index of the track containing the clip - clip_index: The index of the clip slot containing the clip """ try: ableton = get_ableton_connection() result = ableton.send_command("stop_clip", { "track_index": track_index, "clip_index": clip_index }) return f"Stopped clip at track {track_index}, slot {clip_index}" except Exception as e: logger.error(f"Error stopping clip: {str(e)}") return f"Error stopping clip: {str(e)}"
- Core implementation of stop_clip command in Ableton remote script. Retrieves the clip slot for the given track_index and clip_index, calls clip_slot.stop() to stop playback, and returns success result.def _stop_clip(self, track_index, clip_index): """Stop a clip""" try: if track_index < 0 or track_index >= len(self._song.tracks): raise IndexError("Track index out of range") track = self._song.tracks[track_index] if clip_index < 0 or clip_index >= len(track.clip_slots): raise IndexError("Clip index out of range") clip_slot = track.clip_slots[clip_index] clip_slot.stop() result = { "stopped": True } return result
- AbletonMCP_Remote_Script/__init__.py:229-232 (registration)Dispatch registration in remote script's _process_command where 'stop_clip' is listed among state-modifying commands that are scheduled on Ableton's main thread.elif command_type in ["create_midi_track", "set_track_name", "create_clip", "add_notes_to_clip", "set_clip_name", "set_tempo", "fire_clip", "stop_clip", "start_playback", "stop_playback", "load_browser_item"]:
- MCP_Server/server.py:107-108 (registration)'stop_clip' listed as a state-modifying command in server.py for applying processing delays."set_tempo", "fire_clip", "stop_clip", "set_device_parameter", "start_playback", "stop_playback", "load_instrument_or_effect"