Help Wizard

Step 1

NEXT STEP

Generate playlist based on mood

Generate playlist based on mood

Plan

Free/Premium

Country

Indonesia

Device

(iPhone 8, Samsung Galaxy 9, Macbook Pro late 2016)

Operating System

Windows 10

 

My Question or Issue

Is there a way to generate playlist based on mood(ex: happy, sad, relaxed, etc.)?

I read there's a way natively without requiring the need of machine learning based on liveness, valence, etc.

I read it somewhere it is possible woth the API on the developer page, but I may have misread it.

Reply
7 Replies

Mood can be expressed as it's valence and arousal value. There's a endpoint called Get Recommendations (console) where you can search with it. The only difference is that here you must use energy instead of arousal.

The endpoint also requires an artist id, a track id  or a genre. Here is how you can Get Available Genre Seeds (console).

Note: there is no way to search with a mood word directly with the API. So, you'll need to find a list of moods with their valence and arousal values on the internet for yourself.

Let me know if you want more information.

 

 

Ok, I got the value of valence and energy on each emotion I have.

 

> The endpoint also requires an artist id, a track id or a genre. 

I'm slightly confused on this, that means I have to pick which artist (by grabbing the ID)? or this is just a random seed that I can make up?

And one more question:
Do I need to have a playlist on my account to get the music,

or it can generate a temporary playlist based on 2 values (energy and valence) and it gets deleted after some time?

The seed tracks or seed artists need to be the ID of those items.

Spotify gets the tracks form it's own database, and you don't have to / can't provide your own source playlist.

If I want to make the songs fully random (let Spotify pick the songs), should I just empty the seed_artists, 

seed_genres and seed_tracks?

But 1 of 3 is required to generate the result and that's not how I exactly want the result.
 
Should I just put the seed_track a random one instead?

You can let your app pick up to five random genres as a seed.

Some genres are overrepresented with many sub-genres like metal. Also the genres rainy-day, summer and workout are in the list.

You can make your own list from those genres if you want. And maybe you can pick the genre chill if the picked mood is chill etc.

Is there a list of genres that I can use

Yes, you can get them by pressing the Try it button at the Get Available Genre Seeds page.

Suggested posts