add_notes
Add lyrics with timing and pitch to vocal tracks in Synthesizer V AI Vocal Studio for creating or editing vocal melodies.
Instructions
Add one or more notes to a track
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trackId | Yes | ID of the track | |
| notes | Yes | Array of notes to add |
Implementation Reference
- src/index.ts:441-491 (handler)MCP CallToolRequestSchema handler case for 'add_notes': validates and sanitizes input (trackId as number, notes array non-empty, map to string/number), calls executeCommand('add_notes'), returns formatted text response or error.case "add_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("add_notes", { trackId, notes: args.notes.map((note: any) => ({ lyrics: String(note.lyrics), startTime: Number(note.startTime), duration: Number(note.duration), 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 added successfully` }] }; }
- src/index.ts:277-314 (schema)Tool definition including name, description, and inputSchema for 'add_notes' returned by ListToolsRequestSchema handler (serves as registration). Defines required trackId (string) and notes array of objects with lyrics, startTime, duration, pitch.name: "add_notes", description: "Add one or more notes to a track", inputSchema: { type: "object", properties: { trackId: { type: "string", description: "ID of the track" }, notes: { type: "array", description: "Array of notes to add", items: { type: "object", properties: { 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: ["lyrics", "startTime", "duration", "pitch"] } } }, required: ["trackId", "notes"] }
- src/index.ts:76-84 (helper)Generic helper function invoked by the add_notes handler to dispatch the command to Synthesizer V Studio by writing JSON {action: 'add_notes', trackId, notes} to COMMAND_FILE and polling RESPONSE_FILE for result.async function executeCommand(action: string, params: any = {}): Promise<any> { const command = { action, ...params }; await writeCommand(command); return await readResponse(); }