Submitted by notspoon t3_z662va in Music

https://www.naturallanguageplaylist.com/

Natural Language Playlist is essentially DALL-E for playlists! It uses deep neural embeddings to generate a playlist of songs to satisfy your musical itches. "Sentence to playlist" is an idea I've been theory-crafting and building for a while now, and I'm excited to share my results with the entire internet. At any rate, go ahead and try it out yourself!

Edit: Website crashed at 6:25. Back up in 15 minutes. Too many requests. Love this energy and bought more CPU time from my host.

Edit 2: We're back!

Edit 3: The highly coveted back button has arrived. You guys wanted a back button, you GOT a back button!!

513

Comments

You must log in or register to comment.

Herpes-in-space t1_ixzoo9o wrote

Ho. Lee. Shit.

This morning I was telling my wife I want the music Kramer and Frank Costanza use when they are making sausages.

"Caribbean sausage making music" actually did it! Amazing!

Edit: Newman, not Frank.

50

bitee1 t1_ixznubz wrote

also post on r/InternetIsBeautiful

27

OliverCrowley t1_ixzx4wu wrote

This is fantastic. Utterly in love with my results- on the first attempt, even.

18

bathofknives t1_iy09vjx wrote

Same I typed: blood sex and murder. Playlist did not disappoint lol

4

bigfish42 t1_ixzxyu4 wrote

You need a way to go home. On mobile, back button doesn't. Icon or link in the header?

18

notspoon OP t1_ixzyjj7 wrote

Noted! Coding that up boss. 😎

38

notspoon OP t1_iy2m8k5 wrote

Back button is live! I repeat the back button is live!

14

Data_shade t1_ixzvapi wrote

Wow this is an amazing tool for when you’re stuck in musical ruts. Thank you so much for this, I’m spreading the word everywhere I can.

12

xsneakyxsimsx t1_iy0zq9z wrote

'Epic Songs to ride into Battle to'

I can't really fault that list.

11

BinaryPill t1_iy33s65 wrote

US Forces by Midnight Oil is pretty hilarious here though (I'm assuming you're not familiar with it).

3

xsneakyxsimsx t1_iy33zye wrote

I really only know the more major releases from them (Blue Sky Mine, Beds are Burning, King of the Mountain, Power and the Passion, etc).

2

RanCestor t1_iy03mug wrote

I discovered it's capable of racism by asking for "Horribly racist songs"

Are you building Skynet by any chance?

9

JustBrowsing1989z t1_iy0vasf wrote

How does it work exactly?

Is it just based on keywords or is it actually accessing the internet to understand the queries?

For example, if I ask for "songs that played during fight scenes in movies", what does the AI system actually do?

7

notspoon OP t1_iy0yn0v wrote

High level overview:

The sentence embeddings are calculated using a Bidirectional Encoder Representation Transformer (BERT) model. There's a pre-trained model for this network trained on over 1 billion sentences from the internet that is publicly available, (thanks Microsoft) . The model transforms your description into a 784-long list of numbers (a vector) that represents the meaning of your sentence.

The model runs off a dataset of musical metadata for 35,000 songs. This metadata is very rich, it has a lot of useful columns like the genres, subgenres, and descriptions of tracks. The numerical data is binned into categorical values like "obscure" mapping popularity between 0 and 10, "highly danceable" mapping danceability between 80 and 100, etc. The text data is modified into a coherent sentence: "this song's main genres are _____. this song is from the 80s. this name of this song is lovefool by the cardigans. etc"

Each feature for each song in our metadata dataset is now a big paragraph that describes the song overall. The paragraph is split up into sentences, and the embedding of each sentence is found. The final embedding for each song is then calculated by taking the mean all sentence embeddings from the big paragraph.

To make your playlist, all that has to be done is compare the embedding of your query all 35,000 embeddings in the dataset and return the 100 most similar queries, using the cosine similarity distance metric. Thank god we have computers.

Once the 100 most similar tracks are found, your playlist is made by sending the Spotify track IDs through their API, and the link is generated for you.

38

JustBrowsing1989z t1_iy10hru wrote

Thanks for that! Seems very complex

And who provides that dataset? Is it Spotify? Or does it come from the labels or artists?

3

ryan__fm t1_iy3q0st wrote

Not OP but the data points he mentioned are available via Spotify's public API, so that would be my guess.

2

JustBrowsing1989z t1_iya6y9c wrote

That's fascinating stuff!

Amazing they can detect all that programmatically

1

thenerdyn00b t1_iy2k6rc wrote

That's awesome... Well I had the same idea from the site Spotify www.everynoise.com Generating the genre cloud through embedding, and comparing it through cosine similarity..

2

experbia t1_iy2vg5y wrote

This is incredible. Now that you've done it, it seems obvious. But I hadn't thought of it before since we have so many methods of music discovery these days already. Despite this glut of competing discovery mechanisms, I've been able to find a playlist full of new beautiful music in a genre I've found really hard to articulate to "hard" systems in the past or fully understand myself. This "soft" intelligence is fantastic.

If you can do the reverse as well... to recognize abstract themes in a playlist... you have a huge thing here. Those could be taken and combined or adjusted to perform automated playlist curations in an amazing way. Spotify should be hiring you right now. Imagine being able to pick an existing mood playlist you love and say "more with this feel... but higher energy."... being able to pick "rainy day" playlist and curate between "hopeful only" or "meloncholoy only".

Or being able to pick the top two thematic components of two people's playlists and not just interleave the songs but generate a new list with a shared mood. Electronica friend and Hip Hop friend hanging out? No more "one electronica, one hip hop" interleave on merged playlists... all songs with both string electronica and hip hop elements.

7

IDigYourStyle t1_ixzs096 wrote

Okay okay okay....this is just rad! Thanks for making this!

6

Miranda_Leap t1_iy1loz5 wrote

This is really cool! I can see using it in the future, after I exhaust my first 8 hour playlist!

Honestly this feels like a capability Spotify should have, and so I hope they hire you. Their API has always been really good, and combining it like you have is genius.

5

Gucci_Unicorns t1_iy2ov81 wrote

Honestly, “love songs for a sad indie girl sitting in the shower” is everything I needed tonight.

5

3507341C t1_iy2qwkg wrote

Pretty sure you should create as many playlists as possible, associated with subreddits and go post their playlist, along with a link to your site. A few intense weeks of that and you WILL have millions of verifiable hits. Sell code to Spotify and sit back.

5

eldredp t1_iy06phj wrote

This is brilliant, thank you for taking the time to create this and sharing it with all of us!

4

omassmo t1_iy13c17 wrote

This is an algorithm i can support!

3

notspoon OP t1_iy15j70 wrote

CRASHED! Back up in 5 minutes!

3

CaliforniaBoba t1_iy165ro wrote

This is fucking awesome and I’ve told everyone I know about it! Thanks OP!

3

Jensiepoo t1_iy18lwo wrote

Very cool tool, it's not a fan of no lyrics/words searching.

3

Bean_Juice_Brew t1_iy1khbg wrote

Music for a cookout that won't offend my parents"

Result number 12: Fuck Off by The Electric Chairs

3

ryan__fm t1_iy3q78c wrote

"something something offend my parents"? don't mind if I do!

probably best to use the least confusing wording for computers, like "inoffensive" instead..

5

cinemachick t1_iy1o1wr wrote

"Angry vocaloid" and "angry Hatsune Miku" only had angry human music, might need a touch of recalibration (although I know Miku's catalog on Spotify is small)

Edit: "Jpop to listen to in the rain" generated a playlist that was 70% English songs, 30% Japanese. The AI seemed to get hung up on the word "rain", most of the English songs had the word "rain" in the title. Overall mood was upbeat and peppy, I was expecting something softer and gentle (like "Honey" from CardCaptor Sakura or a lo-fi playlist.) Maybe the AI has a harder time with non-English songs in general?

Edit 2: "Queer graduation music" - I intended this to be what you'd play before or after a high school graduation with a large queer population. 70% of it was EDM for some reason? Only a couple actually queer artists were included (Ru Paul, Demi Lovato). Also the song "I Wish I Was Queer So I Could Get Chicks" was in there - I get why the AI would add it in but that one needs to be marked anti-queer in the system

Edit 3: "Rave for preschoolers" mainly had either funk or queer dance music, only about 20% was EDM/Eurodance (and it was far down the playlist.) The songs with lyrics weren't really preschool-appropriate, I was expecting something from Cocomelon or Disney to pop up. 🤷

All of these comments are in good faith, I hope this helps fine-tune the algorithm!

3

notspoon OP t1_iy1r2gw wrote

I see where things are going wrong. The current dataset is based off of singles from so I see why classical music and those other genres are hard to find. As with most data science/AI problems, the solution is almost always more data. I'll be adding more songs within the week from a wider variety of styles and genres!

6

ryan__fm t1_iy3sicx wrote

Does it only include those 35,000 songs in the data set? Or can you use Spotify's similarity features to ID songs outside your set that are similar to sort of "fill out" a playlist? I imagine once you get a few good song "seeds" that match the criteria, you could have Spotify do a bit of the heavy lifting in bringing in other similar songs.

Having trouble connecting since everyone's bombarding the site, but what I got on my first try was very promising. Since this is a natural language thing, it would be amazing to have this work with Siri or Alexa - any plans for something like that? I imagine this would be MUCH better at responding to my kids' music requests than the standard search.

2

Shmezbot t1_iy1sbgi wrote

Great idea, sadly it did not work very well for my search, "psychedelic spaced out Reggae with plenty of reverb snaps". I thought maybe my phrase was too wacky, so attempt #2 was "Reggae, psychedelic, reverb snaps, toasts". This yielded a playlist with maybe 8 out of 100 songs that I would categorize as Reggae. I hope this feedback can somehow help improve your algorithm!

3

Boognish84 t1_iy26y5p wrote

Wrote 'moody happy world music'. Amazing playlist. Thanks for creating / sharing.

3

ioresuame t1_iy29ylh wrote

Will you make it for Apple Music if I pay in tacos and beer?

3

blueskieslisa t1_iy2n4tw wrote

As someone obsessed with making playlists and mixtapes, this is a godsend to find inspiration! I adore it! 🥺

3

SCWthrowaway1095 t1_iy3d441 wrote

Dude, what are you doing here?

Sell that shit to spotify

3

elbrigno t1_iy3l8sv wrote

Would love to try it but seems down

3

w7edwin t1_ixzu06b wrote

This is going to help with my own playlists wow thanks!!

2

misbliss t1_iy09tve wrote

Nice work!! Love it

2

PinkPicklePete t1_iy09v3k wrote

This is amazing! It gave me Kreayshawn in my playlist, but besides that major glitch this is great work.

2

bloodyREDburger t1_iy0gncv wrote

The algorithm must really like space eater by gamma ray as it showed up #1 and #2 for 'the heaviest matter in the universe' and 'aboriginal heavy metal from every continent '

2

deck4242 t1_iy0im4a wrote

great job man !!

2

BudBuzz t1_iy0lle2 wrote

Country songs about farts did not disappoint

2

64penulanalis39 t1_iy0rxzf wrote

This is really cool, really love when people make something like this

2

live9times t1_iy0udmu wrote

this is great! thank you

2

Akominatos t1_iy0uz16 wrote

Nice! Thanks for sharing this, love it so far.

2

Oppositeofbrighter t1_iy10jcq wrote

This is amazing work. I can appreciate how much hard work you would have put into this. Thank you!

Super accurate too

2

Poptart_Investigator t1_iy134rf wrote

Dude this is AWESOME! It actually gives you whatever you ask of it!

2

cferrari22 t1_iy19ls9 wrote

This is brilliant, thank you!

2

Kooky-Attorney-6203 t1_iy1kvtv wrote

Fucking awesome thanks for this will be sharing it around!

2

tikki-tikki-timbo t1_iy1ovpa wrote

Very clever. It seems not to know how to find classical. “Classical music that makes you cry” “Songs like Midnight Sonata”

2

notspoon OP t1_iy1r5np wrote

The current recommendations come from a pool of 35,000 singles. More tracks will be added within the week!

3

tikki-tikki-timbo t1_iy20znk wrote

Very cool, didn’t see that earlier, the pop up of Spotify had me thinking you somehow indexed all of Spotify with some clever under the radar scraper.

2

cheezfreek t1_iy20uyp wrote

Just curious, are you keeping track of the most batshit insane sentences people are sending? Seems like interesting info to me. Of course, I entered the craziest rambling that I could come up with just to see what would happen, so I may be biased.

2

notspoon OP t1_iy22bfz wrote

yep! in the server logs. sending it directly to the CIA........

3

cheezfreek t1_iy22k3s wrote

Please update us on the crazy stupid ones at some point. And no, I don’t know why I’m so excited for that. Maybe something I should look into with a therapist.

2

missprettylikeadevil t1_iy227j2 wrote

This is such a cool idea!! i'm having so much fun playing around with it. the algorithm seems to get hung up on just one or two words though, no matter how much you write. especially if you include a genre name, it seems to kinda zero in on that. i tried things like "barbie let's go party but emo" and "black metal for girls" and it just gave generic emo and metal playlists. but other than that this is super cool!!! i would love to see it fine tuned a little.

Edit: the playlist i got from "songs a barbie doll would listen to while getting ready" was super super good. it shockingly didn't include barbie girl by aqua, though.

2

The_Radiant_Shade t1_iy2pnuo wrote

This rocks! Been hearing nothing but bangers so far 😎

2

Skruffyhound t1_iy316gv wrote

Oh yes, this is good. I have been following Gnod for years hoping for a totally organic interface with my life. Gnod is good too but the ease of the Spotify playlist with this is so great. Looking forward to telling the rest of the family! Thank you

2

Urytion t1_iy35u7f wrote

Dear creator,

I asked your AI to provide me with obscure jazz songs to listen to while crying and eating spaghetti. It unfortunately provided me with songs from a Luxembourg folk band. Very upsetting. 0/10. /s

I think it heard the word "spaghetti" and associated it with Italy, and then to the Luxembourghish band "Rome". I love this idea, it's amazing.

2

divanpotatoe t1_iy04lg5 wrote

Very beautiful but can it be on other platforms as well? Not everyone uses spotify

1

notspoon OP t1_iy070c9 wrote

As of right now no, it’d very hard to build a dataset of songs on Apple Music since they have everything locked down. I think there’s an app called SongShift that can help you out though!

5

doiias t1_iy1z0xc wrote

What does the score mean in the description of each playlist?

1

notspoon OP t1_iy20ica wrote

Your playlist query is compared against the description of each song in the database. These comparisons range from 0 to 1. The top 100 most similar songs are returned back to you. The score is the average between those 100 songs!

2

doiias t1_iy21608 wrote

So a score of 0.1199... is "worse" (less accurate) than a a score of, say, .4? Now I want to know how low a score I could get while still being somewhat specific

1

notspoon OP t1_iy22ivw wrote

Keep in mind that your songs could still be accurate and have a low score. In order to get the highest score you would have to be very specific by describing each feature of the song that the database uses. The genres, description of the genres, the level of danceability, the loudness in decibels, etc.

2

gizzardgumbo t1_iy3amfw wrote

This is awesome. “Deep cuts of popular 80’s of popular hard rock and heavy metal with a positive mood to workout to.”

1

ViktorVaughnVillian t1_iy75f4w wrote

Shit blew up my computer and the computer next to me. You're def going to jail for this I won't forget about this you mark my friggin words bro I'm gonna bang you over the head for doing something so nice like this.

1