set_track_input
Configure recording input sources for tracks in REAPER, specifying audio channel indexes or MIDI device encodings to route signals appropriately.
Instructions
Set the recording input for a track.
For audio: 0-based audio input channel index.
For MIDI: use REAPER's I_RECINPUT encoding (e.g. 4096 + channel*32 + device).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes | ||
| input_index | Yes |
Implementation Reference
- src/reaper_mcp/server.py:952-964 (handler)The MCP tool handler for 'set_track_input', which registers the tool and calls the reaper adapter.
@mcp.tool() def set_track_input(track_index: int, input_index: int) -> dict[str, Any]: """ Set the recording input for a track. - For audio: 0-based audio input channel index. - For MIDI: use REAPER's I_RECINPUT encoding (e.g. 4096 + channel*32 + device). """ try: return _wrap( adapter.set_track_input(track_index=track_index, input_index=input_index) ) except Exception as exc: return _err(exc) - src/reaper_mcp/server.py:952-964 (handler)MCP tool handler registration for set_track_input.
@mcp.tool() def set_track_input(track_index: int, input_index: int) -> dict[str, Any]: """ Set the recording input for a track. - For audio: 0-based audio input channel index. - For MIDI: use REAPER's I_RECINPUT encoding (e.g. 4096 + channel*32 + device). """ try: return _wrap( adapter.set_track_input(track_index=track_index, input_index=input_index) ) except Exception as exc: return _err(exc) - The adapter method that communicates with the REAPER client to perform the set_track_input action.
def set_track_input( self, track_index: int, input_index: int ) -> dict[str, Any]: return self._client.call( "set_track_input", track_index=track_index, input_index=input_index, ) - ReaperAdapter helper method that calls the bridge client for set_track_input.
def set_track_input( self, track_index: int, input_index: int ) -> dict[str, Any]: return self._client.call( "set_track_input", track_index=track_index, input_index=input_index, )