quantize_clip
Quantize MIDI clip notes and durations to a beat grid, with adjustable strength and optional end quantization to correct timing inaccuracies.
Instructions
Quantize MIDI clip note positions and lengths to a specified beat grid.
Reads notes, calculates quantized positions, writes back using mode='replace',
and verifies the result.
Args:
track: Track index in song.tracks.
slot: Scene/slot index in track.clip_slots.
grid: Quantization grid in beats (0.25 = sixteenth notes, 0.5 = eighth notes).
strength: Quantization strength from 0.0 (no change) to 1.0 (full snap).
quantize_ends: When True, also quantizes note durations / end positions.
Returns:
Dictionary containing write result and quantization details.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grid | No | ||
| slot | Yes | ||
| track | Yes | ||
| strength | No | ||
| quantize_ends | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||