duplicate_clip_loop
Extend loop duration by doubling its length and duplicate notes and envelopes. For non-looped clips, it replicates the clip's start/end range.
Instructions
Makes the loop twice as long and duplicates notes and envelopes. Duplicates the clip start/end range if the clip is not looped.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| clip_id | Yes |
Implementation Reference
- src/tools/clip-tools.ts:198-202 (handler)The handler function for the 'duplicate_clip_loop' tool. It retrieves the clip by ID using getClipById and calls the clip's duplicateLoop method to duplicate the clip loop, then returns a success result.async duplicateLoop({ clip_id }: { clip_id: string }) { const clip = getClipById(clip_id) await clip.duplicateLoop() return Result.ok() }
- src/tools/clip-tools.ts:190-197 (registration)The @tool decorator registers the 'duplicate_clip_loop' tool, defining its name, description, and input schema (clip_id: string).@tool({ name: 'duplicate_clip_loop', description: `Makes the loop twice as long and duplicates notes and envelopes. Duplicates the clip start/end range if the clip is not looped.`, paramsSchema: { clip_id: z.string(), } })
- src/tools/clip-tools.ts:194-196 (schema)Zod schema for the tool's input parameters: clip_id as string.paramsSchema: { clip_id: z.string(), }
- src/main.ts:41-41 (registration)The ClipTools class, containing the duplicate_clip_loop tool, is included in the tools array passed to startMcp for server-level tool registration.tools: [BrowserTools, ClipTools, DeviceTools, HistoryTools, SongTools, TrackTools, ExtraTools, ApplicationTools]
- src/main.ts:8-8 (registration)Imports the ClipTools class which defines the duplicate_clip_loop tool.import ClipTools from './tools/clip-tools.js'