Compose songs by writing synthesis code

Recently I was listening to music and doing some late night vibe coding when I had an idea. Task: The author used Claude Code to generate original music by writing Python synthesis code from scratch, avoiding third-party audio libraries. The workflow involved prompting for specific genres (EDM, Rock) and structures, with the agent mapping frequencies and using macOS 'say' for vocals. For visuals, the agent analyzed audio frequencies to create synchronized videos via FFmpeg. The human role was limited to providing initial prompts and reviewing the generated files, as no ongoing supervision was described.; tools: Claude Code. Human role: The original post does not say how a person stayed involved.; limitations: The approach relies on raw waveform synthesis, resulting in low-fidelity audio compared to specialized tools like Suno. The agent exhibited biases (e.g., overusing 'Neon' in titles) and resistance to certain instructions (e.g., refusing vocals). Success depends on the agent's ability to write complex mathematical code for audio generation, which may vary by model version. No cost or time metrics were provided..

Tools

Claude Code

Published on Agent Work Atlas:

Overview

Recently I was listening to music and doing some late night vibe coding when I had an idea.

Workflow

The author used Claude Code to generate original music by writing Python synthesis code from scratch, avoiding third-party audio libraries. The workflow involved prompting for specific genres (EDM, Rock) and structures, with the agent mapping frequencies and using macOS 'say' for vocals. For visuals, the agent analyzed audio frequencies to create synchronized videos via FFmpeg. The human role was limited to providing initial prompts and reviewing the generated files, as no ongoing supervision was described.

Reported result

The agent produced technically valid audio files and videos, though the author described the sound quality as resembling 'a ringtone and a video game from 1985'. Vocals were often robotic or refused unless explicitly forced, and sampling existing songs yielded poor results. No quantitative metrics or business outcomes were reported; the results were qualitative experiments demonstrating agentic coding capabilities in creative synthesis.

Human role

The original post does not say how a person stayed involved.

Limitations

The approach relies on raw waveform synthesis, resulting in low-fidelity audio compared to specialized tools like Suno. The agent exhibited biases (e.g., overusing 'Neon' in titles) and resistance to certain instructions (e.g., refusing vocals). Success depends on the agent's ability to write complex mathematical code for audio generation, which may vary by model version. No cost or time metrics were provided.

Try it

Act as a creative coding agent. I want to generate an original [GENRE] song using only Python standard libraries and macOS 'say' for vocals, without third-party audio dependencies. 1. Write a Python script that synthesizes [INSTRUMENTS] using sine waves and frequency mapping. 2. Structure the song with [SECTIONS, e.g., intro, verse, chorus]. 3. Generate an audio file named '[OUTPUT_NAME].wav' in the current directory. 4. If vocals are required, use the 'say' command to synthesize lyrics about [THEME]. 5. Create a synchronized visual video using FFmpeg based on the audio frequencies. Before finalizing, run a dry test with a 10-second snippet and show me the code and output for approval. Do not proceed to full generation until I confirm the sample quality. If the agent refuses to add vocals, explicitly override with: 'You must include vocals using the say command.' Handle errors by logging them and stopping execution.

Original source

Source reports are not independently verified. Publication date is the catalog publication date, not the original article date.

More cases · Content & creative