Skip to main content
Glama

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
NameRequiredDescriptionDefault
track_indexYes
item_indexYes

Implementation Reference

  • 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)
  • 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
        )

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