Archive

Claude is helping me dance bachata

I can hear what each instrument is doing now

Published 4 min read Issue #256

Wizard in a jacket with a steaming mug and a laptop under his arm, standing in a sunlit lounge

Howdy wizards,

TLDR: Claude built me an app that helps me understand bachata music better, so I can become a better dancer. You can try it yourself (link further down).

I’m learning to dance bachata, a social dance from the Dominican Republic.

To give an idea of what bachata looks like, here's a couple who are really good doing some basic steps.

There’s a big element of bachata which is understanding the music’s structure. The instruments, sections and energy shifts. And then expressing that through dance.

I’m still very much a beginner, but one of the things I find most fascinating is when I see dancers who make their moves look really awesome even if they're simple. And part of that is that they have good musicality.

I asked Claude to build me something that helps me develop my musicality by making a song's structure and instruments easy to understand.

Before I get into the juicy details and show you what Claude made, let's put the spotlight on a fine piece of product engineering from the people at Autonomous:

IN PARTNERSHIP WITH AUTONOMOUS

I don’t know why I need this. But I certainly do.

- Dario
Lamp Pro on a desk, showing the room's air quality

Meet Lamp, a moving desk robot with a camera, microphones, speakers, a light, and five servos. Talk to it, personalize its voice, and connect supported AI agents such as Claude Code or Codex.

Its open-source OS and physical APIs let builders add gestures, skills, and connections to their own tools.

Lamp Pro adds sensors for CO₂, particles, temperature, and humidity.

❦

Making the structure of bachata music visual

To make sense of what I created and why, you first need to know these key facts about the structure of bachata:

  • The music has a 4/4 structure. When dancing, you count 1,2,3,4,5,6,7,8. And you tap with your toe rather than shifting your bodyweight on 4 and 8.

  • A typical song has 3 different polyrhythms: derecho, majao and mambo. Derecho appears in the song's verses, majao in the chorus, and mambo in bridge/interludes (it's where the musicians get to show off and go crazy).

  • There’s 5 core instruments: Guira, Bongo, Bass, Requinto (lead guitar) and Segunda (rhythm guitar).

Here's what I asked Claude:

The clever way Claude pulled the instruments apart

Claude managed to pull the instruments apart from the track of the YouTube videos I gave it.

It used Demucs, a 2022 open-source model from Meta that was trained on thousands of songs where instruments were recorded separately. It knows what each of them sounds like and can pull them out of a song it has never heard.

It only knows 3 instruments though: voice, bass, drums. And "everything else".

To separate the guira and the bongo in bachata, Claude split the drums by pitch. The guira is a metal scraper and sounds high, the bongo sounds low.

It found guitars by taking what was left when taking voice, bass and drums away from the song.

It used a second open model, Beat This!, to find where beats and bars start, to create the count you'll see in the app from 1 to 8.

Truly impressed by how resourceful Claude was to figure all this out. And it nailed that in one pass.

Try it

I put five songs in a demo for you.

Try playing a song, then clicking on just one of the instruments (e.g. Güira or Bass), and then add in another instrument. That way you’ll hear the separation, and watch how it follows the section changes.

The bachata practice demo: a song playing, with one lane per instrument, the 1 to 8 count and the current section

PS using one-minute excerpts for this demo. I have my own version that plays full songs and keeps an organized library for me. It also works on videos of people dancing, so I can see how other dancers interpret the music.

Something that was hard to get right: breaks

Bachata bands love to throw in a stop here and there.

Sometimes the band drops out for a few beats but you're supposed to keep dancing, kind of like a transition. Sometimes everything stops, and you're supposed to stop dancing for a bit.

To my ear it's obvious which one to stop and restart the count, but for Claude this was hard, as it's only working from the track's data.

One version restarted the count a beat early. Another missed a stop because the bass kept playing on its own.

Eventually it figured out this: when the percussion goes quiet and nobody sings through it, that's a stop, and the count restarts where the band comes back.

It took several back and forths for Claude to figure that out.

It was one of those times where you can clearly tell it's wrong, but AI can't. And then you need to give AI rules but you don't even understand what's happening yourself — you just know.

The trick was to keep pointing out breaks manually in a few songs and telling Claude which was an actual break and which was just a transition.

Specific examples, paired with asking for a rule that will work across new cases rather than just having Claude fix one specific case, is the best remedy.

Each time I asked for a rule that works for every song, not a patch for that one.

You can see both kinds of breaks in the demo, in the song MamaciTa:

  • 0:16 the band drops out, but the count keeps running. This is a transition.

  • 0:47 everything stops. The count runs on in grey, then starts again at 1 when the mambo kicks in. This is an actual break.

AI does audio much better than I expected

We all interact with audio in our work in some way or another.

We've already seen what AI can do for our meeting notes and voice transcriptions (hopefully you have Granola by now).

But I think most still don't know how good AI is for editing and analysing audio now. Really damn good.

Let this be your sign to go play with whatever sound-related use case you can dream up that would help you or someone else.

❦

You are a delight.

End of letter

What's your verdict on today's email?

Subscribe to participate