insert_audio_file
Add audio files to specific tracks at precise time positions in REAPER projects for audio editing and arrangement.
Instructions
Insert an audio file onto a track at the given position (seconds).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes | ||
| file_path | Yes | ||
| position | Yes |
Implementation Reference
- src/reaper_mcp/server.py:435-451 (handler)The handler function for the `insert_audio_file` tool, which is registered as an MCP tool and calls the adapter.
@mcp.tool() def insert_audio_file( track_index: int, file_path: str, position: float, ) -> dict[str, Any]: """Insert an audio file onto a track at the given position (seconds).""" try: return _wrap( adapter.insert_audio_file( track_index=track_index, file_path=file_path, position=position, ) ) except Exception as exc: return _err(exc) - The adapter method that facilitates the actual communication with the Reaper client to insert the audio file.
def insert_audio_file( self, track_index: int, file_path: str, position: float, ) -> dict[str, Any]: return self._client.call( "insert_audio_file", track_index=track_index, file_path=file_path, position=position, )