transform_clip
Apply transpose, invert, retrograde, or augment transformations to MIDI clip notes, overwriting the source or writing to a specified destination.
Instructions
Read a MIDI clip's notes, apply a classical motif transformation, and write
the result. Overwrites the source clip unless dest_clip_index is given
(in which case that destination slot is REPLACED instead).
op (one of):
transpose - shift every pitch by amount semitones (integer; may be
negative). Timing unchanged; out-of-range pitches clamped.
invert - mirror pitches about the first note's pitch (up-motion becomes
down-motion). amount is ignored.
retrograde - play the motif backwards in time (onset order reversed,
durations preserved). amount is ignored.
augment - scale start times and durations by amount (a factor > 1
stretches/slows, 0 < amount < 1 compresses/speeds up).
Requires amount > 0.
amount therefore means semitones for transpose and a time factor for
augment. Returns a short summary of what was written.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| amount | No | ||
| clip_index | Yes | ||
| track_index | Yes | ||
| dest_clip_index | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |