Skip to main content
Glama

create_midi_item

Add a MIDI item to a track with optional note data to compose or edit music in REAPER projects.

Instructions

Create a MIDI item on a track and optionally pre-populate it with notes.

  • start / end: time in seconds

  • notes: list of {start_ppq, end_ppq, pitch, velocity=100, channel=0}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
startYes
endYes
notesNo

Implementation Reference

  • The MCP tool definition for `create_midi_item`, which wraps the `ReaperAdapter` method.
    @mcp.tool()
    def create_midi_item(
        track_index: int,
        start: float,
        end: float,
        notes: list[dict[str, Any]] | None = None,
    ) -> dict[str, Any]:
        """
        Create a MIDI item on a track and optionally pre-populate it with notes.
        - start / end: time in seconds
        - notes: list of {start_ppq, end_ppq, pitch, velocity=100, channel=0}
        """
        try:
            return _wrap(
                adapter.create_midi_item(
                    track_index=track_index,
                    start=start,
                    end=end,
                    notes=notes,
                )
            )
        except Exception as exc:
            return _err(exc)
  • The actual implementation in `ReaperAdapter` that calls the bridge client to create a MIDI item.
    def create_midi_item(
        self,
        track_index: int,
        start: float,
        end: float,
        notes: list[dict[str, Any]] | None = None,
    ) -> dict[str, Any]:
        return self._client.call(
            "create_midi_item",
            track_index=track_index,
            start=start,
            end=end,
            notes=notes or [],
        )

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