quantize_midi_notes
Snap MIDI note onsets to the project bar/beat grid to tighten timing and add swing while preserving note lengths.
Instructions
Quantize MIDI note onsets onto the grid (tighten sloppy timing, add swing).
Onsets snap to the PROJECT bar/beat grid, not to an offset from the item's own start,
and note lengths are preserved: start and end move together. Notes that land past the
item end are kept, and one that would land before the item start is placed at it; both
are counted in out_of_bounds (clamped stays 0 here).
Args: grid: Grid spacing in beats: 0.25 = 1/16, 0.5 = 1/8, 1.0 = 1/4. Must be > 0. strength: 0.0-1.0. 1.0 snaps exactly onto the grid, 0.5 moves each note halfway there, 0.0 is a no-op. swing: 0.0-1.0. 0.0 = straight, 1.0 = full triplet feel (off-beats at 66.7%), scaling linearly between. Only the off-beat (odd) grid cells are delayed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid | No | ||
| swing | No | ||
| fields | No | ||
| channel | No | ||
| end_beat | No | ||
| strength | No | ||
| pitch_low | No | ||
| item_index | Yes | ||
| pitch_high | No | ||
| start_beat | No | ||
| track_index | Yes | ||
| return_notes | No |