Compose songs by writing synthesis code
The author ran one-shot experiments where Claude Code wrote Python to synthesize music, including a rock song with sung lyrics via macOS say; sampling a song failed.
Done withClaude Code
- What they did
- Josh Cohenzadeh gave Claude Code one-shot prompts: no exploration, no third-party dependencies, no questions, and it had to produce an audio file. It wrote Python that built notes from raw waveforms and arranged full songs. For the rock song, it used macOS say for vocals. He also had it generate videos from the audio, and an album.
- How it went
- It produced an original song, an EDM track, a rock song with lyrics, music videos and a 5-track album. Sampling an existing song came out poorly. Getting vocals was hard, and one attempt produced robotic non-English singing.
- Worth knowing
- Claude Code only added vocals when explicitly told to, and repeated runs kept reusing themes like the word "Neon".
Try it yourself with Claude Code
Write a Python script that synthesizes a short [genre] song from scratch, with a [mood] feel, a clear melody, bass, and drums, and render it to a WAV file. If you can, add sung lyrics about [topic] using the macOS say command. Finish by playing or exporting the file and telling me what to tweak to improve it.
Want help getting this working? Join the Vibe Coding Academy ↗ Run by Alex Finn, who also runs this site.
Source: josh.ing · Undated
Related use cases
Turn tickets into merged pull requests
Pulls tasks from GitHub Issues or Linear, then runs Claude Code or Codex in isolated Kubernetes pods to carry each one through to a PR.
Automate event social posting across platforms
Claude Code connected social channels to drive event registrations, working well on Twitter and Reddit and somewhat on LinkedIn.
Send daily WhatsApp reminders of what to pack for school
A commenter built a Claude Code tool that sends a WhatsApp reminder the day before about what to pack in a child's school bag.
Produce a track in Ableton Live by talking
An MCP server that lets Codex drive Ableton Live, used to write and mix a full song from chat messages.
Build a slide deck from a single prompt
Scout used its pptx skill to build a 5-slide quarterly cloud review deck saved to Downloads, with diagrams and HTML artifacts also covered.
Post a rendered video to Slack when integration fails
Codex read Slack feedback, edited and re-rendered a video, then used Computer Use to click Add file and post it in Slack.
Get 5 like this every morning
The best things people got an AI agent to do, each with the prompt to try it.