Skip to main content
Glama

nudge_midi_notes

Add human-like variation to MIDI notes by applying random timing and velocity offsets, with adjustable ranges for natural-sounding musical performances.

Instructions

Humanize all MIDI notes in an item with random timing and/or velocity offsets.

  • timing_range_ppq: maximum ±PPQ timing shift per note (0 = no timing change). At 960 PPQ, 20 PPQ ≈ 1/48th note of swing.

  • velocity_range: maximum ±velocity shift per note (0 = no velocity change). Velocity is clamped to 1-127.

  • seed: optional integer for reproducible results (omit for random each call). Returns the per-note changes applied.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
track_indexYes
item_indexYes
timing_range_ppqNo
velocity_rangeNo
seedNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The method in ReaperAdapter that makes the actual call to the bridge client.
    def nudge_midi_notes(
        self,
        track_index: int,
        item_index: int,
        timing_range_ppq: float = 0,
        velocity_range: int = 0,
        seed: int | None = None,
    ) -> dict[str, Any]:
        return self._client.call(
            "nudge_midi_notes",
            track_index=track_index,
            item_index=item_index,
            timing_range_ppq=timing_range_ppq,
            velocity_range=velocity_range,
            seed=seed,
        )
  • The registration and wrapper function for the nudge_midi_notes tool.
    def nudge_midi_notes(
        track_index: int,
        item_index: int,
        timing_range_ppq: float = 0,
        velocity_range: int = 0,
        seed: int | None = None,
    ) -> dict[str, Any]:
        """
        Humanize all MIDI notes in an item with random timing and/or velocity offsets.
        - timing_range_ppq: maximum ±PPQ timing shift per note (0 = no timing change).
          At 960 PPQ, 20 PPQ ≈ 1/48th note of swing.
        - velocity_range: maximum ±velocity shift per note (0 = no velocity change).
          Velocity is clamped to 1-127.
        - seed: optional integer for reproducible results (omit for random each call).
        Returns the per-note changes applied.
        """
        try:
            return _wrap(
                adapter.nudge_midi_notes(
                    track_index=track_index,
                    item_index=item_index,
                    timing_range_ppq=timing_range_ppq,
                    velocity_range=velocity_range,
                    seed=seed,
                )
            )
        except Exception as exc:
            return _err(exc)
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Excellent disclosure of clamping behavior ('Velocity is clamped to 1-127'), randomization nature, and return value ('Returns the per-note changes applied'). Missing only destructiveness disclosure (whether original notes are overwritten).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Perfectly structured with high information density. Front-loaded action sentence followed by bullet-point parameter details. The PPQ conversion example ('At 960 PPQ, 20 PPQ ≈ 1/48th note') adds concrete value without verbosity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the output schema exists, describing the return value is appropriate. However, for a 5-parameter editing tool with 0% schema coverage, leaving 2 required parameters (track_index, item_index) undocumented creates significant ambiguity about how to target specific items despite rich documentation of the algorithmic parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema coverage, description must compensate. It excellently documents 3/5 parameters (timing_range_ppq with PPQ conversion example, velocity_range with clamping note, seed with reproducibility note) but completely omits documentation for required parameters 'track_index' and 'item_index', leaving critical selection criteria undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb 'Humanize' with clear resource (MIDI notes) and mechanism (random timing/velocity offsets). The term 'humanize' clearly distinguishes this from sibling 'set_midi_notes' (precise control) by implying probabilistic/randomized modification.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides clear parameter-level guidance (e.g., '0 = no timing change') and explains the seed parameter for reproducibility. However, lacks explicit guidance on when to use this versus 'set_midi_notes' or prerequisites like selecting the correct track/item.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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