get_midi_notes
Extract MIDI note data from media items in REAPER projects, returning note timing, pitch, velocity, and channel information for analysis or processing.
Instructions
Read all MIDI notes from a media item's active MIDI take. Returns a list of notes with start_ppq, end_ppq, pitch, velocity, channel.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes | ||
| item_index | Yes |
Implementation Reference
- src/reaper_mcp/server.py:331-342 (handler)The MCP tool handler for 'get_midi_notes', which exposes the tool and calls the adapter.
@mcp.tool() def get_midi_notes(track_index: int, item_index: int) -> dict[str, Any]: """ Read all MIDI notes from a media item's active MIDI take. Returns a list of notes with start_ppq, end_ppq, pitch, velocity, channel. """ try: return _wrap( adapter.get_midi_notes(track_index=track_index, item_index=item_index) ) except Exception as exc: return _err(exc) - src/reaper_mcp/server.py:331-332 (registration)Tool registration using the @mcp.tool() decorator.
@mcp.tool() def get_midi_notes(track_index: int, item_index: int) -> dict[str, Any]: - Adapter method that forwards the 'get_midi_notes' request to the underlying bridge client.
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 )