stop_playback
Halt playback of an Ableton Live session instantly using this MCP server tool, designed for direct control in AI-assisted music production workflows.
Instructions
Stop playing the Ableton session.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- MCP_Server/server.py:491-500 (handler)The primary MCP tool handler for 'stop_playback'. It obtains an Ableton connection and sends the 'stop_playback' command over socket to the remote script, returning success or error message.@mcp.tool() def stop_playback(ctx: Context) -> str: """Stop playing the Ableton session.""" try: ableton = get_ableton_connection() result = ableton.send_command("stop_playback") return "Stopped playback" except Exception as e: logger.error(f"Error stopping playback: {str(e)}") return f"Error stopping playback: {str(e)}"
- The remote script's implementation of stop_playback command handling, which calls Ableton Live's song.stop_playing() API and returns the playing status.def _stop_playback(self): """Stop playing the session""" try: self._song.stop_playing() result = { "playing": self._song.is_playing } return result except Exception as e: self.log_message("Error stopping playback: " + str(e)) raise