edit_notes
Modify one or multiple notes in a vocal track on the MCP server for Synthesizer V AI. Adjust lyrics, pitch, start time, and duration for precise editing.
Instructions
Edit one or more notes
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | Array of notes to edit | |
| trackId | Yes | ID of the track |
Implementation Reference
- src/index.ts:493-544 (handler)Handler for the 'edit_notes' MCP tool. Validates trackId and notes array, maps note properties to numbers/strings, calls executeCommand('edit_notes') to perform the edit via file communication with Synthesizer V Studio Lua script, and returns success/error message.case "edit_notes": { const args = request.params.arguments as any; const trackId = Number(args.trackId); if (isNaN(trackId)) { return { content: [{ type: "text", text: "Error: Invalid track ID" }], isError: true }; } if (!Array.isArray(args.notes) || args.notes.length === 0) { return { content: [{ type: "text", text: "Error: No notes provided" }], isError: true }; } const result = await executeCommand("edit_notes", { trackId, notes: args.notes.map((note: any) => ({ id: Number(note.id), lyrics: note.lyrics && String(note.lyrics), startTime: note.startTime && Number(note.startTime), duration: note.duration && Number(note.duration), pitch: note.pitch && Number(note.pitch) })) }); if (result.error) { return { content: [{ type: "text", text: `Error: ${result.error}` }], isError: true }; } return { content: [{ type: "text", text: result.message || `${args.notes.length} notes edited successfully` }] }; }
- src/index.ts:330-373 (schema)Input schema definition for the 'edit_notes' tool, defining required trackId (string) and notes array (each with required id (number) and optional lyrics, startTime, duration, pitch). Listed in ListToolsRequestHandler.{ name: "edit_notes", description: "Edit one or more notes", inputSchema: { type: "object", properties: { trackId: { type: "string", description: "ID of the track" }, notes: { type: "array", description: "Array of notes to edit", items: { type: "object", properties: { id: { type: "number", description: "The ID of the note" }, lyrics: { type: "string", description: "Lyrics text for the note" }, startTime: { type: "number", description: "Start time in ticks" }, duration: { type: "number", description: "Duration in ticks" }, pitch: { type: "number", description: "MIDI pitch (0-127)" } }, required: ["id"] } } }, required: ["trackId", "notes"] } },
- src/index.ts:76-84 (helper)Helper function used by the edit_notes handler (and others) to execute the low-level 'edit_notes' command by writing JSON to COMMAND_FILE and reading response from RESPONSE_FILE, communicating with external Lua script.async function executeCommand(action: string, params: any = {}): Promise<any> { const command = { action, ...params }; await writeCommand(command); return await readResponse(); }