stretch_midi_notes
Scale MIDI note timing by a factor around a pivot to create half-time or double-time rhythms while preserving each note's relative spacing.
Instructions
Stretch or compress MIDI timing (half-time, double-time, or any ratio).
Each targeted note scales as a rigid unit about one fixed pivot: its distance from the
pivot and its own length both multiply by factor, so the rhythm is preserved and only
the speed changes. Notes that land past the item end are kept as-is; one pushed before
the item start begins at the item start but keeps its scaled end, so it comes out
shorter. Both are counted in out_of_bounds (clamped stays 0 here).
Args: factor: Time scale ratio, must be > 0. 2.0 = twice as long (half-time), 0.5 = half as long (double-time). pivot_beat: The fixed point, in beats from the item start; may be negative. None = the earliest targeted onset.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| factor | Yes | ||
| fields | No | ||
| channel | No | ||
| end_beat | No | ||
| pitch_low | No | ||
| item_index | Yes | ||
| pitch_high | No | ||
| pivot_beat | No | ||
| start_beat | No | ||
| track_index | Yes | ||
| return_notes | No |