Mood-Generated Music Player (Idea)

It’s all started since I made an emotion-based controller. Since then, I wanted to improve how people listen to music based on their mood. Dealing with mood is actually very tricky because even scientists can’t categorize mood since it can be too personal. This project will only be a proof of concept on how people can experience listening to music based on what they think they feel.

Emotion Based Melody

Why Spotify

Spotify has become a largest bank of music database. Not only that, it has its own API that can be used publicly to create our own music player application. It also can be personalized since it stores all of a user’s listening history to generate user’s preferences.

I decided to use Spotify API for this project, because Spotify is the only app that has “mood” feature. Not specifically labeled “mood” but it has its own Json data that can be mapped to make a certain mood.

Spotify Mood Playlists

Music Player Design

Just awhile ago, I was really amazed by single input controller. I think it’s really clever because it’s intuitive, simple, but can create rich output. Since I’m obsessed with single-input controller, I really one to make it for this project. So, instead of using face recognition, I’m thinking to use a tangible controller. That said, I’m using pressure sensor because I think it’s the closest way to know one’s mood: based on how strong the grip is.

The controller (pressure sensor) will detect how strong user grips it, and based on the value, it will look for a song that is mapped to a certain mood. I’m also thinking to use LED for the feedback so user knows what mood is being played visually.

For this controller, I’m thinking to use bluetooth to connect it to user’s phone to make it more compact and wireless. Then on user’s phone side, I’ll use Spotify API to browse a specific song based on input value.

Mood Generated Music Player

This project is really challenging for me because it’s really hard to make a compact and wireless controller. Since my past projects mostly were not small in size.

Past Projects

Spotify sure is an expansive bank of music. It has the richest data feature for a song. I looked at Spotify API, specifically for audio feature and it gives me this Json data:

Audio Feature in Spotify API


Looking at the data, I’m thinking to use these 3 components (danceability, energy, and valence) to map the mood.


“Danceability describes how suitable a track is for dancing based on a combination of musical elements including tempo, rhythm stability, beat strength, and overall regularity. A value of 0.0 is least danceable and 1.0 is most danceable.”


“Energy is a measure from 0.0 to 1.0 and represents a perceptual measure of intensity and activity. Typically, energetic tracks feel fast, loud, and noisy. For example, death metal has high energy, while a Bach prelude scores low on the scale. Perceptual features contributing to this attribute include dynamic range, perceived loudness, timbre, onset rate, and general entropy.”


“A measure from 0.0 to 1.0 describing the musical positiveness conveyed by a track. Tracks with high valence sound more positive (e.g. happy, cheerful, euphoric), while tracks with low valence sound more negative (e.g. sad, depressed, angry).”


Next Steps

Mapping mood? (very subjective)

Mapping pressure to mood?

What songs to be played for certain mood?

Leave a Reply

Your email address will not be published. Required fields are marked *