Skip to main content
Glama

add_notes

Insert MIDI notes into existing MIDI items in REAPER DAW tracks by specifying pitch, timing, duration, and velocity parameters.

Instructions

Add MIDI notes to an existing MIDI item.

Args:
    track_number: Track number (1-based)
    item_index: Index of the MIDI item (0-based)
    notes: List of note dictionaries with:
        - pitch: MIDI note number (0-127, middle C = 60)
        - start: Start position in beats (relative to item)
        - duration: Duration in beats
        - velocity: Velocity (1-127, default 100)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_numberYes
item_indexYes
notesYes

Implementation Reference

  • The primary MCP tool handler for 'add_notes', decorated with @mcp.tool() which registers the tool and defines its input schema via type annotations and docstring. It calls ReaperBridge.add_notes to perform the action.
    @mcp.tool()
    def add_notes(
        ctx: Context,
        track_number: int,
        item_index: int,
        notes: List[Dict[str, Any]]
    ) -> str:
        """
        Add MIDI notes to an existing MIDI item.
        
        Args:
            track_number: Track number (1-based)
            item_index: Index of the MIDI item (0-based)
            notes: List of note dictionaries with:
                - pitch: MIDI note number (0-127, middle C = 60)
                - start: Start position in beats (relative to item)
                - duration: Duration in beats
                - velocity: Velocity (1-127, default 100)
        """
        bridge = get_bridge()
        result = bridge.add_notes(track_number - 1, item_index, notes)
        return result.get("message", f"Added {len(notes)} note(s)")
  • Helper method in the ReaperBridge class that serializes the add_notes parameters and sends them as a command to the REAPER bridge protocol.
    def add_notes(self, track_index: int, item_index: int, notes: List[Dict]) -> Dict[str, Any]:
        """Add MIDI notes via file command."""
        self._write_command("add_notes", {
            "track_index": track_index,
            "item_index": item_index,
            "notes": notes
        })
        
        response = self._read_response()
        if response:
            return response
        return {"success": True, "message": "Notes command sent"}

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/yura9011/scythe_mcp_reaper'

If you have feedback or need assistance with the MCP directory API, please join our Discord server