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
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes | ||
| item_index | Yes | ||
| note_index | Yes | ||
| start_ppq | No | ||
| end_ppq | No | ||
| pitch | No | ||
| velocity | No | ||
| channel | No | ||
| selected | No | ||
| muted | No |
Implementation Reference
- src/reaper_mcp/reaper_adapter.py:165-194 (handler)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 - src/reaper_mcp/server.py:292-311 (registration)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 """