On Slum Village's Raise It Up, J Dilla's snare lands 19 milliseconds before the beat, in the same place every bar. I wanted a drum machine where you could grab that snare and move it yourself. So I asked Claude to build one. Then I asked it to put the machine in a donut box.
01The idea
This is another side project built by describing it. Sample Explorer was a tool, the Listening Room was a place, and ALL CAPS was a room for MF DOOM.
DOOM hid things, so his tribute was a room full of secrets. James Yancey, J Dilla, did something to time. On his MPC3000 he kept some parts straight, swung others, and nudged single drums a hair early or late and left them there. It sounds loose, but each hit lands in the same place every bar. Dan Charnas's book Dilla Time calls it a third way to feel rhythm, after straight and swing.
You can read that sentence and not hear a thing, so the tribute had to be something you play.
Baker's Dozen is a drum machine in your browser. It plays one beat three ways: straight, swing and Dilla. Every hit is drawn on the screen as far off the beat as it sounds, with the distance in milliseconds, and you can drag any of them.
02The brief
My first message pointed at the last three projects and asked for ideas:
Look at my sample project, my listening room and most recently ALL CAPS projects and help me to plan a new project, this time for J DILLA. Research into the artist and help me generate some ideas based on what you find
Claude read the three write-ups, researched him and came back with five ideas. One was another walkable room. One was his album Donuts as a ring you spin. The one it recommended was a drum machine where you drag the beat, because it was the only idea that put his timing in your hands. My reply was two words:
Dilla Time
That was the working name. It lasted nearly three hours.
03Check first
Same rule as Sample Explorer: before designing anything, find out whether the thing you need exists. Here there were two things. Can a browser play a drum hit on time to the millisecond? And does anyone publish where Dilla's hits fall?
The first answer was yes. Claude recorded the browser's own output and checked where 176 clicks landed. All 176 were within a fiftieth of a millisecond. It also froze the page on purpose to see what broke, and it broke: hits arrived up to 76 ms late. Booking each hit a quarter of a second ahead fixed it.
The second answer was no. The good writing on his timing shows it in pictures, without numbers. So I said:
Yes, measure them
Claude wrote a tool that finds each kick, snare and hi-hat in a short preview and stacks every bar on top of the others. Before pointing it at a record it tested it on a beat it had made, with the snare 18 ms early. The tool said 18.4.
| Record | Year | Snare, against the hi-hats |
|---|---|---|
| The Pharcyde, Runnin' | 1995 | On the beat |
| De La Soul, Stakes Is High | 1996 | On the beat |
| Slum Village, Raise It Up | 2000 | 19 ms early |
| Slum Village, Keep It On | 2000 | 27 to 30 ms early |
| Slum Village, Untitled / Fantastic | 2000 | About 9 ms early, over swung hats and a late kick |
In these records the snare sits on the beat in the mid-90s and has moved early by 2000. It's a small sample from 30-second clips, so I wouldn't claim more than that. But it gave the machine real numbers, and those numbers later became a button that sets the machine to each record.
04What got built
What happens when you open it:
- Turn on the light. The first screen is a wall switch in the dark. Flip it and a lamp strikes twice, catches and hums.
- Open the box. The camera moves in on a pink donut box. The lid pops, the machine's screen wakes up, and the camera goes overhead.
- Turn the dial. The beat is already playing. The dial goes from straight through swing to Dilla, and anywhere between. Go past Dilla and it falls apart.
- Drag a hit. Every square on the screen moves. A pair of buttons shifts the one you touched by exactly one millisecond.
- Press Record. It steps through four of the records we measured and sets the tempo and the timing of each.
- Share it. The link carries your beat. Whoever opens it lands on the machine, with the room one click away.
The switch
The box
The machine05The look: mine first, then his
The first playable version was dressed like my own website: a serif headline, hairlines, one green accent. I'd played with it for a few minutes before I said so:
This is awesome but I really want to make this something that is Dilla styled and themed, it just follows my standard design of my own site
Claude stopped and offered three worlds: the machine he worked on, a 1950s donut shop, or a home-dubbed beat tape. I picked the machine: a warm grey chassis, a green screen in pixel type, rubber pads and a dial, with no brand names on it.
My site's style
His machineA little later I wanted the donut shop as well:
Do you think we can make it so that the drum machine sits inside a pink donut box, closed, on a desk in the middle of a room which is nothing but the room with a spotlight that is over the top of the drum machine. It is well rendered as a 3d model, and when clicking it the donut box, the lid opens, the camera zooms and pans to the drum machine from a birds eye view and it becomes playable
Claude built the opening from that message by measuring the real page: every pad, key and dial is rebuilt in 3D in the same spot, so when the camera lands overhead the real machine can fade in on top of the model.
The room then took a dozen short messages. The desk was wrong and there were no donuts:
The desk is a bit weird, it's not the type of desk I'd expect to see this on... but let's add donuts on the table around the box, as if they drum machine has taken over the box and the donuts are outside of it
06The name
Nearly three hours in, with an About page written, Claude pointed out something I hadn't checked. Dilla Time is the title of Dan Charnas's book, and the playlist I'd embedded belongs to an account of the same name. Mine would look like an official companion.
Suggest alternatives
try again for names,
Baker's Dozen is better, but with a simple subline
A baker's dozen is thirteen: a dozen that's off by one. Being slightly off, on purpose and every time, is what the machine is about. Claude added three donuts to make twelve on the table. The machine in their box is the thirteenth.
07How it works
The short version. Skip it if you came for the prompting.
- The site: plain HTML, CSS and three.js. No framework and no build step. Hosted on Vercel and served at theluckystrike.co.uk/dilla.
- The timing: every hit is booked a quarter of a second ahead on the browser's audio clock. When you drag one, the hits that haven't sounded yet are cancelled and booked again, so you hear the change on the next beat.
- The drums and keys: recordings of a real kit and a Wurlitzer electric piano, both free to use. Each file is trimmed to within half a millisecond of its attack, so a hit sounds when the screen says it does. The bass is made in the browser.
- The room: a scanned table and a scanned donut, with the icing recoloured into six flavours. The box and the machine are built in code from the page's own measurements.
- The hand-over: a lit 3D model never quite matches a flat page. So there's a second, unlit copy of the machine painted in the page's own colours, and it fades in during the camera's flight.
- The light switch: browsers won't play sound until you tap something. The switch is that tap.
08How I prompted
Like a design crit, again. These are my real messages, typos included.
Name the feeling, then the cause
the animation to open the box to the actual machine is a tiny bit jarring, how do we fix that
"Jarring" got three fixes: a stutter at the moment of landing, a brightness jump and a small shift in the pads. It was better and still wrong. I looked again and could say why:
the colours of the machine in the box and the machine head on are what make it jarring, colour match exactly
That's when the unlit copy went in. My next message was "much much better".
Turn a limit into the design
I'd asked for the lamp to flicker on with a click and a buzz. Claude said it couldn't: no sound before the first tap. So I asked a question:
Do we need a loader, then when clicking the CTA for the loader, it can trigger the sound for the light switch click and buzz
The loading screen became a light switch. It covers the wait, it's the tap the browser needs, and it's the first thing you'd do in a dark room anyway.
Keep saying it isn't good enough
donut ice on the donuts need major improvement, it's blocky
still can be. alot bette
Claude rebuilt the icing twice and then told me where the ceiling was: these were shapes made in code, and a scan of a real donut would beat them. It couldn't download one without an account. I could.
Use a scanned one
I found one on Sketchfab and dropped the file in. It's the lesson from ALL CAPS again: find, don't build.
Use your own ears
Claude can't hear. It said so every time it touched a sound, and asked me to listen. When I did:
i've listened, it sounds ok but what would you do to improve it?
It gave me five things, starting with the big one: the drums were made from tones and noise, and his sound is drums lifted off records. I said "do them all". Six minutes later there were recorded drums, a Wurlitzer, a bass line you can drag, and keys that duck under each kick.
sounds so much better now
Ask what's left, with a condition
ok, what's left, to truly improve by simplifying or adding, only when making a true impact
The list had five things to do and four to cut. The best one replaced three planned sections with a single button, the one that sets the machine to a record. Another was a problem I'd never have found: the machine didn't fit on a laptop screen, and it had only looked fine because the window we were both using was unusually tall.
Kill ideas quickly
does replacing the O in dozen work with a donu?
Claude mocked it up on the first screen and told me it wouldn't do it: a round donut breaks a tall, narrow word. I looked.
no doesn't look good
That took about a minute, and nothing in the project had been touched.
09What broke
| What I saw | What was actually wrong | The fix |
|---|---|---|
| The box landed off to one side of the machine | A label Claude gave the page while the box was closed had the same name as the style for the intro text. The whole page was being squeezed to 44 characters wide | A different name |
| The machine changed colour as the real one took over | A model lit by a lamp can't match a flat page, however the lamp is tuned. And when the unlit copy went in, invisible label layers were hiding it | The unlit copy, drawn in front, with the lit one hidden at landing |
| Twelve donuts standing on their edges | The scan wasn't stored lying flat | Find the direction in which the donut is thinnest, stand that up, then turn the iced side to the top |
| The preview of my own site refused to build | Claude's commits carried an email address that GitHub ties to a different account | I changed one setting. Claude tried to fix it itself and wasn't allowed to change who the commits were from |
| "Completely broken on phone, landscape" | The 3D picture kept the shape the screen had before I turned the phone. And a leftover rule stretched the button into a blob | The picture re-reads the screen's size as it runs |
The scan, as delivered
On my phoneClaude had tested phone sizes all afternoon and they'd passed. It had always loaded the page already on its side. A person picks the phone up, opens the link and then turns it. My two screenshots found three bugs in a minute.
10On a phone
A drum machine is wider than it is tall, so I made a call early:
Make this a landscape only thing on phones and touch devices, portrait makes no sese
Held upright, the page says "Turn your phone sideways" and nothing else. On its side, the whole machine fits one screen in three columns.
Later I asked for an accessibility pass. It found real problems: you could tab into the hidden machine, small labels were too faint, there was no way to skip the intro. It fixed them. It also added a way past the sideways rule, because the guidelines say not to lock a screen's orientation, and it told me it had changed something I'd asked for. I took it back out:
block portrait completely, it makes no sense
That one's on me. It's written down in the project notes as my decision, with the guideline it goes against.
11What I took from it
The look belongs to the subject. My first version was a nice page about Dilla. It needed to be his machine. Ask whose world it is before the first screen.
Check first, then measure. Ten minutes of checking told me the timing would hold and that the numbers I wanted didn't exist. Measuring them took most of an hour and turned into the best feature.
Find, don't build. The table, the donut, the drums and the piano all got good the moment they were real things someone had already recorded or scanned. All free, with credit.
You are the ears, and the phone. Claude can read a page and measure a click to a fiftieth of a millisecond. It can't hear a snare or hold a phone. The two biggest jumps in quality came from me listening for ten seconds and from two screenshots.
Name the feeling, then look again. "Jarring" got three sensible fixes and stayed jarring. "The colours" got the right one.
Ask what to cut. Three planned sections became one button, a card of instructions became one line, and six planned secrets became one.
Go and turn on the light. Open the box, turn the dial to Dilla, and pull the snare early. Then count the donuts.
An unofficial tribute to James Dewitt Yancey, 1974–2006. Not affiliated with his estate. Built with Claude Code. The idea of "Dilla time" is from Dan Charnas's book Dilla Time; Ethan Hein's writing on it helped. Donut scan by Viky_3D (CC BY 4.0, via Sketchfab). Drums from Big Rusty Drums by Karoryfer Samples (CC0). Wurlitzer EP200 recorded by Greg Sullivan (CC BY 3.0). Table and floor from Poly Haven (CC0). None of J Dilla's recordings are used.