Inspiration

There are so many music online and there is so little that we know. There must be another angle to which we can explore musics, which would be refreshing. Also, I feel like it could bring a sense of renewal to the workplace. I personally listen to music whenever I work. When I feel that I have listened to the same music over and over, I do not want to listen to music any more. For people who like to explore, this would be an app for them. It would also make us escape from our repetitive day to day reality.

What it does

It allows to search for musics based on bpm, danceability, valency (mood happy or sad), and popularity. This is not directly available for manipulation to the user, but it is shown through emotions.

How I built it

I figured out that Spotify has a decent API that I could use for that purpose. Furthermore, it has some specific attributes that I mentioned in 'What it does' that no other API I have found have. I built my application around that.

Challenges I ran into

However, I also needed a web player to play the music I have selected. Unfortunately, Spotify offers something for that, but the access token must be changed manually every hour. That means that I had to find another way to play the music. I ended up with Youtube, but Youtube does not let you search with Spotify's IDs for music, which makes it very difficult integrating both. Sometimes it works, sometimes it does not. Also, the web API's statistics based on audio are not as high and low as I had hoped. Thus, I extract from every 50 songs 3 musics that best relate to the selection of the emotion that the user made. I also did not sleep...

Accomplishments that I'm proud of

Before this project, I did not even know about emotions being linked to music, and that there was actually a Wiki about it. I had no idea how to get started, and many things I have discovered right in the hackathon. It was the most exhaustive use of concurrency I ever did to date. Spotify seriously does not like people using their API, but it did make me some mad skills with concurrency.

What I learned

I learned that from the stats that Spotify offered, I could actually create a totally random playlist which would introduce me to different styles, along with different artists. It is so easy to be stuck with the artists we already know because that is exactly what Youtube does: it suggests you most of the time music you already know about, or you know the artist that does the music.

What's next for Moodify

I do not know, but it certainly will not go commercial, because of the API dependencies. I liked the project, it introduced me to something new, but I do not believe I will touch it again any time soon.

Share this project:

Updates