sc_record_start
Start recording audio output to a specified file in the recordings directory for capturing generated sounds and synthesis results.
Instructions
Start recording audio output to a file
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filename | Yes | Output filename (will be saved in recordings/ directory) |
Implementation Reference
- src/index.ts:439-456 (handler)The main handler logic for the 'sc_record_start' tool. It validates the input filename using Zod, checks if the SuperCollider server is booted, generates SuperCollider code to start recording to the specified file in the 'recordings/' directory, executes it via scServer.executeCode, and returns a success message.case 'sc_record_start': { const schema = z.object({ filename: z.string() }); const { filename } = schema.parse(args); if (!scServer.getBooted()) { return { content: [{ type: 'text', text: 'Error: SuperCollider server is not running. Call sc_boot first.' }], isError: true, }; } const code = `Server.default.record("recordings/${filename}");`; await scServer.executeCode(code); return { content: [{ type: 'text', text: `Started recording to recordings/${filename}` }], }; }
- src/index.ts:167-180 (registration)The tool registration in the tools array, including name, description, and input schema definition. This makes the tool available via ListTools and dispatches to the handler on call.{ name: 'sc_record_start', description: 'Start recording audio output to a file', inputSchema: { type: 'object', properties: { filename: { type: 'string', description: 'Output filename (will be saved in recordings/ directory)', }, }, required: ['filename'], }, },
- src/index.ts:440-441 (schema)Runtime input validation schema using Zod, mirroring the declared inputSchema.const schema = z.object({ filename: z.string() }); const { filename } = schema.parse(args);