transform
Apply musical transformations to current pattern: transpose, reverse, stretch, quantize, humanize, swing, scale, or generate variations.
Instructions
Apply a single transform op to the current session pattern. op=transpose shifts notes by semitones. op=reverse appends .rev to the pattern. op=stretch slows by factor (>1 slower, <1 faster). op=quantize snaps to the grid (e.g. "1/16"). op=humanize adds rand-nudge timing of amount (0-1). op=swing applies .swing(amount). op=scale applies a root/scale filter to notes. op=vary returns a variation of type (subtle/moderate/extreme/glitch/evolving). Example: transform({ op: "transpose", semitones: 7 }). For effects (add/remove) use effect; for mood/energy/refine use shape; for tempo use set_tempo.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | Which transform to apply | |
| semitones | No | op=transpose: integer semitones to shift | |
| factor | No | op=stretch: stretch factor | |
| grid | No | op=quantize: grid size (e.g. "1/16") | |
| amount | No | op=humanize/swing: amount 0-1 | |
| root | No | op=scale: root note (e.g. "C") | |
| scale | No | op=scale: scale name (e.g. "minor") | |
| type | No | op=vary: variation type (subtle/moderate/extreme/glitch/evolving) | |
| session_id | No | Optional session ID (#108). Omit to use default session. |