add_effect
Apply and customize audio effects to Strudel.cc music patterns using the add_effect tool, enabling enhanced sound manipulation in AI-powered music generation and live coding.
Instructions
Add effect to pattern
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| effect | Yes | Effect name | |
| params | No | Effect parameters |
Implementation Reference
- Handler implementation for the 'add_effect' tool. Retrieves the current pattern, appends the specified effect (with optional parameters) to it using string concatenation, writes the modified pattern back, and returns a confirmation message.case 'add_effect': const currentEffect = await this.getCurrentPatternSafe(); const withEffect = args.params ? currentEffect + `.${args.effect}(${args.params})` : currentEffect + `.${args.effect}()`; await this.writePatternSafe(withEffect); return `Added ${args.effect} effect`;
- Input schema and tool registration for 'add_effect' in the getTools() method, defining the tool's name, description, and expected input parameters.name: 'add_effect', description: 'Add effect to pattern', inputSchema: { type: 'object', properties: { effect: { type: 'string', description: 'Effect name' }, params: { type: 'string', description: 'Effect parameters' } }, required: ['effect'] }
- src/server/EnhancedMCPServerFixed.ts:476-476 (registration)The 'add_effect' tool is listed in requiresInitialization array, indicating it requires browser initialization before execution.'add_effect', 'add_swing', 'set_tempo', 'save', 'undo', 'redo'