create_project
Create a new REAPER project with specified tempo and time signature, setting the foundation for your audio production.
Instructions
Create a new REAPER project with the given tempo and time signature.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tempo | No | ||
| time_signature | No | 4/4 | |
| name | No |
Implementation Reference
- src/reaper_mcp/project_tools.py:17-34 (handler)The create_project tool handler: creates a new REAPER project using RPR.Main_OnCommand(41929), sets tempo and time signature via reapy, then returns success/failure.
def create_project(tempo: float = 120.0, time_signature: str = "4/4", name: str = "") -> dict: """Create a new REAPER project with the given tempo and time signature.""" try: RPR.Main_OnCommand(41929, 0) # File: New project project = get_project() project.bpm = tempo if time_signature: num, denom = map(int, time_signature.split("/")) project.time_signature = (num, denom) return { "success": True, "name": name or f"New Project {time.strftime('%Y-%m-%d %H-%M-%S')}", "tempo": project.bpm, "time_signature": time_signature, } except Exception as e: logger.error(f"create_project failed: {e}") return {"success": False, "error": str(e)} - src/reaper_mcp/project_tools.py:14-35 (registration)The register_tools function that wraps create_project with the @mcp.tool() decorator, registering it as an MCP tool.
def register_tools(mcp): @mcp.tool() def create_project(tempo: float = 120.0, time_signature: str = "4/4", name: str = "") -> dict: """Create a new REAPER project with the given tempo and time signature.""" try: RPR.Main_OnCommand(41929, 0) # File: New project project = get_project() project.bpm = tempo if time_signature: num, denom = map(int, time_signature.split("/")) project.time_signature = (num, denom) return { "success": True, "name": name or f"New Project {time.strftime('%Y-%m-%d %H-%M-%S')}", "tempo": project.bpm, "time_signature": time_signature, } except Exception as e: logger.error(f"create_project failed: {e}") return {"success": False, "error": str(e)} - src/reaper_mcp/server.py:10-28 (registration)The server.py imports and calls register_tools from project_tools to register create_project on the FastMCP instance.
from reaper_mcp.project_tools import register_tools as _reg_project from reaper_mcp.track_tools import register_tools as _reg_track from reaper_mcp.midi_tools import register_tools as _reg_midi from reaper_mcp.fx_tools import register_tools as _reg_fx from reaper_mcp.audio_tools import register_tools as _reg_audio from reaper_mcp.mixing_tools import register_tools as _reg_mixing from reaper_mcp.render_tools import register_tools as _reg_render from reaper_mcp.mastering_tools import register_tools as _reg_mastering from reaper_mcp.analysis_tools import register_tools as _reg_analysis _reg_project(mcp) _reg_track(mcp) _reg_midi(mcp) _reg_fx(mcp) _reg_audio(mcp) _reg_mixing(mcp) _reg_render(mcp) _reg_mastering(mcp) _reg_analysis(mcp) - src/reaper_mcp/connection.py:27-29 (helper)The get_project helper used by create_project to obtain the current REAPER project object via reapy.
def get_project() -> reapy.Project: ensure_connected() return reapy.Project() - The function signature defines the schema: tempo (float, default 120.0), time_signature (str, default "4/4"), name (str, default "") as inputs, and returns a dict.
def create_project(tempo: float = 120.0, time_signature: str = "4/4", name: str = "") -> dict: