Skip to main content
Glama

set_midi_notes

Batch-edit multiple MIDI notes simultaneously in REAPER projects. Update pitch, velocity, timing, and other properties for multiple notes in one efficient operation.

Instructions

Batch-edit multiple MIDI notes in one call. More efficient than calling set_midi_note() repeatedly. Each entry in 'notes' must have 'note_index' and any subset of: pitch, velocity, start_ppq, end_ppq, channel, selected, muted. Omitted fields keep their current values.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
item_indexYes
notesYes

Implementation Reference

  • The handler function for the `set_midi_notes` tool, which wraps the adapter call.
    @mcp.tool()
    def set_midi_notes(
        track_index: int,
        item_index: int,
        notes: list[dict[str, Any]],
    ) -> dict[str, Any]:
        """
        Batch-edit multiple MIDI notes in one call. More efficient than calling
        set_midi_note() repeatedly.
        Each entry in 'notes' must have 'note_index' and any subset of:
          pitch, velocity, start_ppq, end_ppq, channel, selected, muted.
        Omitted fields keep their current values.
        """
        try:
            return _wrap(
                adapter.set_midi_notes(
                    track_index=track_index,
                    item_index=item_index,
                    notes=notes,
                )
            )
        except Exception as exc:
            return _err(exc)
  • Registration of the `set_midi_notes` function as an MCP tool.
    @mcp.tool()
  • The adapter implementation that forwards the `set_midi_notes` request to the bridge client.
    def set_midi_notes(
        self,
        track_index: int,
        item_index: int,
        notes: list[dict[str, Any]],
    ) -> dict[str, Any]:
        return self._client.call(
            "set_midi_notes",
            track_index=track_index,
            item_index=item_index,
            notes=notes,
        )

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