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
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes | ||
| item_index | Yes | ||
| notes | Yes |
Implementation Reference
- src/reaper_mcp/server.py:354-377 (handler)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) - src/reaper_mcp/server.py:354-354 (registration)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, )