set_tempo
Change the project tempo to the specified BPM, setting the pace for all tracks and time-based operations.
Instructions
Set the project tempo in BPM.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bpm | Yes |
Implementation Reference
- src/reaper_mcp/project_tools.py:108-116 (handler)The actual handler function that sets the project tempo using reapy's Project.bpm property.
@mcp.tool() def set_tempo(bpm: float) -> dict: """Set the project tempo in BPM.""" try: project = get_project() project.bpm = bpm return {"success": True, "tempo": project.bpm} except Exception as e: return {"success": False, "error": str(e)} - src/reaper_mcp/project_tools.py:108-109 (registration)The @mcp.tool() decorator registers set_tempo as an MCP tool. The register_tools function in project_tools.py is called from server.py.
@mcp.tool() def set_tempo(bpm: float) -> dict: - src/reaper_mcp/connection.py:27-29 (helper)Helper function get_project() used by set_tempo to obtain the current REAPER project object.
def get_project() -> reapy.Project: ensure_connected() return reapy.Project() - The type annotation bpm: float serves as the input schema. The function returns a dict with success/tempo or success/error keys.
def set_tempo(bpm: float) -> dict: