This Claude Skill Makes Sound Effects From Code
A Claude skill that writes sound effects as numbers and puts each one on its frame.
How it was made
01Write the sound as numbers
Every sound here is an array of numbers made with numpy and scipy. There are no recordings, samples or models behind it. A recipe is a Python function of about twenty lines that takes settings and a seed and returns samples. The same settings and seed give the same samples on any machine.
Three methods cover most of the recipes. A bell is a few sine waves that each fade at their own rate (additive synthesis). A whoosh starts as noise, which is every frequency at once, and a moving filter removes most of it (subtractive synthesis). The science-fiction sounds come from one sine wave bending the pitch of another very quickly (frequency modulation).
The pictures on this page are spectrograms: time runs left to right, pitch runs bottom to top, and brighter means louder. The strip along the top is the waveform.
TrapMeasurements pass sounds a listener rejects
The agent that writes the recipes can't hear. It can measure a sound and read its spectrogram, and neither says whether the sound is good. A language model asked to grade the attempts gave footsteps on snow and on grass 8 out of 10. Both were rejected on the first listen.
Every recipe was kept or killed by a person listening on a local audition page. That took 23 rounds.
02Build textures one event at a time
Rain is built drop by drop, about a hundred drops a second, each with its own time, position and loudness. Fire gets a crackle for every spark. A cricket's chirp is four quick pulses, counted off a field recording. The dust on a record is the same idea, with a scratch that comes back once every turn.
A sound built from a list of events can hand that list over. The --events option writes every drop, crackle or click with its time and position, so an animation drawn from the same list shows each drop at the moment it is heard. A recording of rain can't say where its drops are.
TrapEven spacing sounds like a machine
One key sound repeated at a fixed interval is heard as a machine. In the typing recipe no two keys are the same sound and the gaps between them vary.
03Fit it to a real recording
The first rain was plain white noise. The fix was to measure: take a field recording, measure its level and texture in nine bands from 63 Hz to 14 kHz, build the sound to those numbers, and put the two spectrograms side by side. Only then does a person listen.
Drag the slider to compare ten seconds of the field recording with ten seconds of the rain recipe.

Field recordingMade from codeTrapBuild from a recording, not from a description
Sounds fitted to a real recording passed the listening rounds. Sounds built from a physical model or a paper alone nearly always failed, even when their band measurements looked right.
04Build backwards from the frame
Each sound knows its own sync point: the hit in a riser, the pop after a swish. The request gives the time of the event and the file is built backwards from it, exact to the sample. An agent that built the animation already knows which frame the title lands on.
The riser below was told one thing, that the hit comes 2 seconds in. A riser that has to be 2.2 seconds long is built at 2.2 seconds, and nothing is stretched. A chime can be built in the key of the music under it.
TrapThree frames late is audible
At 30 frames a second, a hit that lands three frames (0.1 s) after its title feels wrong, even to a viewer who can't say why. The video plays both versions. In the finished file the on-frame hit measures 3 ms from its frame.
05Compute the sound from the picture
Because the sound is code, it can be worked out from whatever is on screen. In the video a physics simulation gives every impact its own sound: a bigger ball plays a lower note and a harder hit is louder. A storm is drawn as a curve and the rain follows the line. Lightning a kilometre away is followed by its thunder three seconds later.
The video's soundtrack is 94 sounds, each one a time and a line of settings in a script. Change a number and it renders again.
06What still fails
Breaking glass, footsteps on snow, grass or gravel, engines, doors and anything meant to sound far away all failed when made this way. For those the skill finds a free recording and writes its source, author and licence beside the file.
They are listed as open problems in the repository, which is MIT licensed and installs as a Claude Code plugin.