scale_midi_note_velocities
Modify MIDI note velocities in REAPER by multiplying, setting a fixed value, or compressing toward a pivot, clamped to 1-127.
Instructions
Scale MIDI note velocities: multiply, set to a fixed value, or compress toward a pivot. Results clamp to 1-127.
Args:
mode: "multiply" (velocity * ratio), "set" (velocity becomes value), or "compress"
(pivot + (velocity - pivot) * ratio).
ratio: Multiply factor (>= 0, no upper cap), or compress amount (0.0-1.0, where 0
collapses every note onto the pivot and 1.0 changes nothing).
value: Target velocity for "set" mode (1-127).
pivot: What compress pulls toward (1-127), or -1 for the rounded mean of the matched
notes' velocities (reported as pivot_used).
Returns: {ok, notes_changed, clamped, skipped, out_of_bounds, pivot_used, notes:[...]}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | multiply | |
| pivot | No | ||
| ratio | No | ||
| value | No | ||
| fields | No | ||
| channel | No | ||
| end_beat | No | ||
| pitch_low | No | ||
| item_index | Yes | ||
| pitch_high | No | ||
| start_beat | No | ||
| track_index | Yes | ||
| return_notes | No |