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
| Name | Required | Description | Default |
|---|---|---|---|
| track_index | Yes | ||
| item_index | Yes | ||
| timing_range_ppq | No | ||
| velocity_range | No | ||
| seed | No |
Implementation Reference
- src/reaper_mcp/reaper_adapter.py:210-225 (handler)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, ) - src/reaper_mcp/server.py:380-407 (registration)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)