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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"track_index": "<track_index>",
"clip_index": "<clip_index>",
"op": "<op>"
},
"name": "transform_clip"
}
}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 |