duplicate_clip_region
Copy and transpose MIDI notes within a specified region to a new location in Ableton Live. Select pitch range and adjust semitone transposition for precise editing.
Instructions
Duplicates the notes in the specified region to the destination_time. Only notes of the specified pitch are duplicated if pitch is not -1. If the transposition_amount is not 0, the notes in the region will be transposed by the transposition_amount of semitones. Raises an error on audio clips..
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip_id | Yes | ||
| destination_time | Yes | ||
| pitch | Yes | ||
| region_end | Yes | ||
| region_start | Yes | ||
| transposition_amount | Yes |
Implementation Reference
- src/tools/clip-tools.ts:220-237 (handler)The handler function for the 'duplicate_clip_region' tool. It retrieves the clip using getClipById and calls the clip.duplicateRegion method with the provided parameters, then returns a success result.async duplicateRegion({ clip_id, region_start, region_end, destination_time, pitch, transposition_amount }: { clip_id: string, region_start: number, region_end: number, destination_time: number, pitch: number, transposition_amount: number }) { const clip = getClipById(clip_id) await clip.duplicateRegion( region_start, region_end, destination_time, pitch, transposition_amount ) return Result.ok() }
- src/tools/clip-tools.ts:204-219 (registration)The @tool decorator that registers the 'duplicate_clip_region' tool, including its name, description, and Zod input schema for parameters.@tool({ name: 'duplicate_clip_region', description: `Duplicates the notes in the specified region to the destination_time. Only notes of the specified pitch are duplicated if pitch is not -1. If the transposition_amount is not 0, the notes in the region will be transposed by the transposition_amount of semitones. Raises an error on audio clips..`, paramsSchema: { clip_id: z.string(), region_start: z.number(), region_end: z.number(), destination_time: z.number(), pitch: z.number(), transposition_amount: z.number(), } })
- src/tools/clip-tools.ts:211-218 (schema)The Zod schema defining the input parameters for the 'duplicate_clip_region' tool.paramsSchema: { clip_id: z.string(), region_start: z.number(), region_end: z.number(), destination_time: z.number(), pitch: z.number(), transposition_amount: z.number(), }