set_tempo
Adjust the tempo of your Ableton Live session by specifying a new BPM value to control playback speed and timing.
Instructions
Set the tempo of the Ableton session.
Parameters:
tempo: The new tempo in BPM
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tempo | Yes |
Implementation Reference
- The actual implementation of set_tempo that interacts with the Ableton Live song object.
def _set_tempo(self, tempo): """Set the tempo of the session""" try: self._song.tempo = tempo result = { "tempo": self._song.tempo } return result except Exception as e: self.log_message("Error setting tempo: " + str(e)) raise - MCP_Server/server.py:347-358 (handler)The MCP tool handler that receives the request and calls the _run helper.
def set_tempo(ctx: Context, tempo: float) -> str: """ Set the tempo of the Ableton session. Parameters: - tempo: The new tempo in BPM """ try: _run("set_tempo", {"tempo": tempo}) return f"Tempo set to {tempo} BPM" except Exception as e: return f"Error setting tempo: {e}"