Skip to main content

Mercatr, and what it’s there for

Using AI to build an anti-algorithmic music recommendation engine

Closeup photograph of piano keys; the keys have been colorfully (and roughly) painted, with brush strokes and paint layering visible. All of the keys look weathered.
Pianos beyond repair can have a second life as community works of art.
Source: B1 Foto / Pixabay / Pixabay Content License

I’m pretty fed up with music recommendation algorithms, and not nearly satisfied enough with the AI-assisted playlist building I’ve run into. So this weekend I wrote my own.

I have two specific beefs with the status quo.

  1. Their decision-making is opaque. You don’t know why a track was chosen.
  2. Recommendation algorithms seem very sonically bound. They hover around the same era and genre as the seed artist.
  3. (Ok, three. Three specific beefs.) When they do break out of a tight circle around the seed artist, it’s easy to suspect the music is being recommended for marketing reasons — that is, someone has paid the streaming service to push that song.

Points 1 and 2 are about understanding and learning, so eventually I realized that what I am seeking is something that enables active listening. The music isn’t something you have going on in the background, it’s something you learn about and generate your own thoughts about.

I don’t want to give the impression that I think active listening is morally superior to passive listening. I do plenty of the passive kind myself. But music is something I enjoy learning and thinking about, and the current music streaming services are not enabling that mode at all. They’ve leaned entirely on the passive behavior and not at all on the active.

Mercatr encourages active listening two ways:

  1. By deliberately looking outside a song or artist’s time and genre.
  2. Providing commentary about why other tracks and artists were chosen.

For example, I asked it to riff on Fiona Apple’s song Extraordinary Machine. Among other tracks, it recommended James Blake’s Limit To Your Love.

Electronica, but listen: Blake takes a song about erotic restraint and turns it into something claustrophobic and prismatic. Like Apple, he’s using production as armor—those bass frequencies aren’t warmth, they’re walls. The refusal to let the listener in, the way he hides vulnerability beneath texture: that’s the same move Apple makes with that clattering, hyper-modern production. Both artists use technology as distance rather than connection.

James Blake is new to me, so I gave it a listen and yes; fair play.

Besides exploring an artist (with an optional seed song), you can also specify a theme.

I fed it the theme “a cynical performance of masculinity” and it responded with a fourteen song playlist including Tom Waits, Leonard Cohen, MF Doom, and even Tom Lehrer. Of that last selection (The Masochism Tango, of course), Mercatr says:

Tom Lehrer (a 1953 insertion that defamiliarizes the theme across time) offers comedy as armor—the intellectual’s way of performing, which is really a way of evading.

By far the favorite of my early testers so far is the “bridge” mode. You provide two artists, and it explains how they differ and where they intersect, then finds a few other tracks that explore the territory in between. The natural inclination is to choose two artists as far apart as possible, but sometimes if you pick two with good overlap you get some interesting observations. Given Vanilla Ice and Dr. Dre:

The thematic bridge between them is survival through reinvention under conditions of extreme scrutiny about authenticity. Vanilla Ice couldn’t survive his scrutiny. Dr. Dre transcended his by becoming the judge. One got crushed by hip-hop’s gatekeepers; the other became the gatekeeper.

Limitations

The associations are informed by folksonomy data from Last.fm, then interpreted and expanded on by the LLM. Both of these systems have their own biases. Over many, many playlists I’ve noticed that Mercatr really likes to recommend Nina Simone’s Mississippi Goddam. Tom Waits shows up a lot, and so does art musician Diamanda Galás. The fact that I’m finding these people (and sometimes songs) repeated over many runs suggests to me that the current model I’m using has some strong biases and an unwillingness to look beyond the surface level.

Oh, and about all those playlists: I haven’t listened to any of them. I think this is because the idea of a playlist is passive. What I’m beginning to think is that Mercatr shouldn’t center the playlist so much. It will still output one, but it needs more functionality to enable exploration, not consumption.

Furthermore, a significant amount of that exploration needs to happen outward. The LLM backing Mercatr is perfectly capable of assembling plausible text relating these songs and describing artists. I find LLMs more interesting, though, when they connect me to real human work. I want Mercatr to send people out and hope they come back.

Hands on

I also have the app available on a website, but locked behind a password because I’m being billed by Anthropic for every run. If I know you personally and you are interested, reach out. I’ll share it with you.

If you have some programming chops and want to get your hands on it and see where it takes you, it’s available on GitHub. Feel free to pull it or fork it. There are so many different directions Mercatr could go from here, but at the very minimum it’s a good starting point for you to write your own prompts to suggest music the way you want it suggested to you. If you do that, let me know through Github — I’d love to see what you’ve done.

Your responses