set_track_volume
Adjust the volume level for a specific track in Ableton Live by specifying track index and volume value to control audio output.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes | ||
| volume | Yes |
Implementation Reference
- MCP_Server/server.py:568-576 (handler)The handler function for the 'set_track_volume' MCP tool. It is decorated with @mcp.tool() which registers it with the FastMCP server. The function sends a 'set_track_volume' command to the Ableton remote script via the established connection, handling errors and returning a status message.@mcp.tool() def set_track_volume(ctx: Context, track_index: int, volume: float) -> str: try: ableton = get_ableton_connection() result = ableton.send_command("set_track_volume", {"track_index": track_index, "volume": volume}) return f"Set track '{result.get('track_name')}' volume to {result.get('volume'):.2f}" except Exception as e: logger.error(f"Error setting track volume: {str(e)}") return f"Error setting track volume: {str(e)}"