WORKINGS
Vol. 1

Feature · Nov 2026

I wanted a DJ, not a black box.

Music recommendations are complicated. Here's a way to build your own.

The playlist beside this storyat the bottom of your screen is live. It will update as you read. The controls within this story update it automatically as you read and learn.

Why build my own

Maybe it's just me, but I think the human curators at radio stations are still pretty good at what they do. (That's why my first post was about taking one of their stations on a road trip.)

To me, the music services haven't done as well. The AI playlists are a black box, and not a very good one: "personalization" seems to have made already-meh playlists even more meh. When I try blending two genres in Spotify and Apple Music, I basically get two playlists mashed together.

So ... why not ask Claude or ChatGPT? I use these tools every day, but I wouldn't trust their picks. The model knows which songs are written about but not which ones people actually play. It can't show its work. It's also confidently wrong often enough to matter.

So, I decided to use the AI for what it's really good at doing: Claude helped me build the machine, and the machine picks the songs. There are lots of ways to recommend music, but these are the four aspects I think matter the most:

  1. Part oneThe dataWho listens to what.
  2. Part twoThe lensYour genres, how much variety, how new.
  3. Part threeThe crowdWhich songs people come back to.
  4. Part fourYour appLoad into Spotify or Apple Music.
Part one · The data

Start with open song and listen data

Spotify and Apple keep their listener data private. However, two open music data sources can provide a rich dataset:

More and deeper data would be better; however, this is what anyone can get today from the Internet, and it's enough for a real station.

Part two · The lens

Build a genre from artists you love

Every genre playlist starts with which artists and songs belong to it. On Spotify, that decision is made by either a Spotify curator or another listener. Here, it's up to you. You create a genre with three or four artists. I call these "seeds" because everything else grows from them. My jazz seeds are Miles Davis, John Coltrane and Bill Evans. From those three, Last.fm's data turns up 37 other jazz artists their listeners also play.

Try it Tap an artist to take them out, or type up to three artists you love into + New genre. If you choose artists who have nothing in common, like Miles Davis and Dolly Parton, the station notices and makes two separate genres. Then you use the sliders to decide how much of each you hear.

Fig. 1 · The genre desk
"Found" is how many artists at least two of your seeds have in common.

How does it find more artists? For any artist, Last.fm keeps a list of up to fifty others their listeners also play. The station reads that list for each of your seeds, and the rule is simple: if an artist shows up on two or more of those lists, they're in. One list alone isn't enough, because it says more about that one artist than about the genre. The Smashing Pumpkins' list includes Billy Corgan, their own singer, and none of my other alternative picks list him. But when the fans of two different bands both play a third, that third band probably fits the sound you're after.

Fig. 2 · Two lists to get in
Each dot means one of my heartland seeds lists that artist. The War on Drugs' list is full of indie bands that none of the other artists' lists share, resulting in that artist getting one dot and not being included.

Try itReach is how far from your favorites you want to wander. Close sticks to the artists most of your seeds share (very commonly played together artists). Middle means looser connections, more like what a radio station would play. Adventurous yields artists only a couple of your seeds share, creating some fun surprises. As you adjust the slider, the lit dots spread out on the map.

Try itEra tips the station toward older or newer artists. It doesn't cut anyone out; it just plays one side more often. And "new" depends on the genre: in jazz, recent means the younger players around Miles, not this year's pop. Slide it to Recent, and older bands that just had a hit play that song instead of their classics. That's how Pearl Jam's "Dark Matter" ends up next to Fontaines D.C.

Part three · The crowd

Find the songs people replay

Years ago at iGoDigital I built product recommenders, and the best signal was the customer who came back and bought again. Last.fm has a similar signal: how many times, on average, each listener plays a song. We need to use that number carefully. The biggest hits attract the most die-hard fans, causing them to dominate our playlists. So each song is compared with the normal replay counts for its artist. When a song shows "1.4× replays", people play it 40% more often than you'd expect from that artist.

Try itSong picks which of an artist's ten biggest songs plays. Biggest gets you "Man in the Box". Most replayed gets you "I'm on Fire" and "Heart-Shaped Box".

Every chart carries somebody's taste. As of November 2026, 43 of the 200 most-played songs tagged hip-hop on Last.fm are Kanye's. Picking your own seeds is how you correct for it (unless you're a big Kanye fan).

Part four · Your app

Take it back to your app

A station is only useful if it plays where you listen. Export it as a CSV and bring it into Spotify or Apple Music with TuneMyMusic or Soundiiz. Spin again for a different station from the same genres, or copy a link to the whole mix.

What I learned

  1. You can get surprisingly close to an open playlist generator with what's free today. Having access to Spotify or Apple Music's play data would improve the data, but what we have is a pretty good base.
  2. Data and rules are the hard parts. Claude makes coding easier, but getting the agent to understand how style and taste should be represented is challenging.
  3. There are so many ways this could be expanded further to increase the variety and quality of the recommendations. Don't take for granted just how hard it is to represent taste when building a recommender.

Claude couldn't make me a playlist that felt like mine. It did help me build the thing that does.

One ask: scrobble

Everything here works because people let Last.fm log what they play. The more of us who do it, the better tools like this get. Last.fm connects to Spotify directly, and there are scrobblers for Apple Music on Mac and iPhone.

Try it with your taste

Paste this into the AI coder of your choice and swap in your own seeds.

Help me build a playlist generator around my own taste, using Last.fm's API (artist.getSimilar and artist.getTopTracks). A genre is a list of 3–5 seed artists I pick. An artist belongs to it when two or more of my seeds list them as similar. Each artist plays one song from their top 10, ranked by popularity and by plays per listener compared with that artist's own curve. Let me blend several genres by share and export 20 songs as a CSV. My first genre: [ARTIST, ARTIST, ARTIST].

View source: the whole engine is one file, engine.mjs, about 200 lines.

All posts

Station map

◆ seeds · ● playing · rings = close, middle, adventurous