Skip to main content
Glama

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
NameRequiredDescriptionDefault
track_indexYes
input_indexYes

Implementation Reference

  • 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)
  • 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,
        )

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danielkinahan/ReaMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server