Skip to main content
Glama

set_midi_note

Modify specific properties of an existing MIDI note in REAPER projects, including pitch, velocity, timing, and channel settings.

Instructions

Modify an existing MIDI note. Only the supplied fields are changed.

  • pitch: MIDI note number (0-127)

  • velocity: 0-127

  • channel: 0-15

  • start_ppq / end_ppq: positions in PPQ ticks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
item_indexYes
note_indexYes
start_ppqNo
end_ppqNo
pitchNo
velocityNo
channelNo
selectedNo
mutedNo

Implementation Reference

  • The actual implementation of the 'set_midi_note' tool, which calls the REAPER client.
    def set_midi_note(
        self,
        track_index: int,
        item_index: int,
        note_index: int,
        start_ppq: int | None = None,
        end_ppq: int | None = None,
        pitch: int | None = None,
        velocity: int | None = None,
        channel: int | None = None,
        selected: bool | None = None,
        muted: bool | None = None,
    ) -> dict[str, Any]:
        return self._client.call(
            "set_midi_note",
            track_index=track_index,
            item_index=item_index,
            note_index=note_index,
            start_ppq=start_ppq,
            end_ppq=end_ppq,
            pitch=pitch,
            velocity=velocity,
            channel=channel,
            selected=selected,
            muted=muted,
        )
    
    def get_midi_notes(self, track_index: int, item_index: int) -> dict[str, Any]:
        return self._client.call(
            "get_midi_notes", track_index=track_index, item_index=item_index
  • The MCP tool registration and handler entry point for 'set_midi_note'.
    @mcp.tool()
    def set_midi_note(
        track_index: int,
        item_index: int,
        note_index: int,
        start_ppq: int | None = None,
        end_ppq: int | None = None,
        pitch: int | None = None,
        velocity: int | None = None,
        channel: int | None = None,
        selected: bool | None = None,
        muted: bool | None = None,
    ) -> dict[str, Any]:
        """
        Modify an existing MIDI note. Only the supplied fields are changed.
        - pitch: MIDI note number (0-127)
        - velocity: 0-127
        - channel: 0-15
        - start_ppq / end_ppq: positions in PPQ ticks
        """

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