sc_record_start
Start recording audio output to a specified file for saving synthesized sounds from the SuperCollider server.
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 handler case for 'sc_record_start' tool. It validates the filename input using Zod, checks if the SuperCollider server is booted, generates SuperCollider code to start recording to 'recordings/{filename}', executes it via scServer, 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)Registration of the 'sc_record_start' tool in the tools array, including its name, description, and input schema definition for filename.{ 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:170-178 (schema)Input schema definition for the 'sc_record_start' tool, specifying the required 'filename' string parameter.inputSchema: { type: 'object', properties: { filename: { type: 'string', description: 'Output filename (will be saved in recordings/ directory)', }, }, required: ['filename'],