compose_patch
Generates a complete Pure Data patch for music composition based on user-provided genre, mood, tempo, key, instruments, and effects.
Instructions
Compose a complete musical Pd patch from a high-level song description. Before calling this tool, ask the user about genre, mood, tempo, key, instruments, and effects — use the song_analysis prompt as a guide. Only call this tool once you have enough info. Genres: ambient, techno, house, dnb, experimental, idm, minimal, drone, noise. Moods: dark, bright, aggressive, chill, ethereal, melancholic, energetic. Instrument roles: lead, bass, pad, drums, arpeggio, sequence, texture, modulator. Each role auto-selects appropriate templates (e.g. lead → sequencer + synth, texture → noise synth + granular). IMPORTANT: The complete .pd content is ALWAYS returned in the response — present it directly to the user as code blocks. STOP after presenting the result. Do NOT run bash, ls, mkdir, cat, cp, mv, or ANY file/shell operations after this tool. Do NOT try to save, create, write, or verify files — NEVER use artifacts or file downloads. Everything is already in the response text. Just show the content to the user as-is.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| genre | Yes | Musical genre: "ambient", "techno", "house", "dnb", "experimental", "idm", "minimal", "drone", "noise". | |
| tempo | No | BPM (20-300). Defaults to genre preset. Clamped to genre range. | |
| mood | No | Mood modifier: "dark", "bright", "aggressive", "chill", "ethereal", "melancholic", "energetic". Defaults to genre preset. | |
| key | No | Musical key. Defaults to genre preset. | |
| instruments | No | Instrument specifications. Defaults to genre preset instruments. | |
| effects | No | Effect chain: ["reverb"], ["granular"], or ["reverb", "granular"]. Defaults to genre preset. | |
| controller | No | MIDI controller integration. Generates controller patches. | |
| outputDir | No | Optional ABSOLUTE directory path to write all .pd files. Only use if the user explicitly requests saving to a specific path. If omitted, content is returned but not written to disk. |