We are submitting primarily for the Vitality track, with our goal of revitalizing mental health with music therapy! We also fit into the Disruption track though, with our use of various machine-learning models for decoding neural activity and translating it into mental health states.

Inspiration

With Spotify Wrapped just around the corner, we've blended this concept with the realm of music therapy. In today's generation, where mental health is a pressing concern, research demonstrates the positive effects of music on alleviating the moods of individuals dealing with depression, stress, and anxiety.

Thus, as frequent Spotify listeners ourselves, we felt the need to help create a platform to help us navigate and process our emotions through music playlists and song recommendations.

MyMelody is a mood-based playlist generator and web application designed to enhance users' music listening experience by curating personalized playlists tailored to their daily moods. Whether users are feeling stressed, happy, depressed, or studious, this app ensures that they have the perfect soundtrack for their emotions.

Key Features

  • Allows users to select their top 3 favorite music genres. These preferences guide the playlist generation process.
  • Tracks brain activity to determine the user's current mood.
  • Each mood level is associated with specific keywords. MyMelody uses these keywords to identify songs in the user's favorite genres that match their mood.
  • Selects a random song from the user's preferred genres that aligns with their current mood.
  • At the end of each week, users can access and enjoy playlists generated based on their moods

How we built it

In the early stages of our ideation design process, we wanted an interactive process, fully focused on the user experience. This led us to our initial prototype, which included pages asking for user input, as well as an overall results dashboard, displaying the user's mood and recommended playlists. Because our theme was music and mental health, our design and branding included soothing shades of blue that mimicked both ocean waves and the brain waves that we were using to generate our results.

To build the app, we used Flask. We developed a model trained on data we collected ourselves, and augmented it with data from this dataset: https://www.kaggle.com/datasets/shashwatwork/eeg-psychiatric-disorders-dataset. It detects different mood swings, like depression, studious moods, neutral, happy, and stressed based on EEG data.

Then, we built a small json dataset of various music pieces, including the lyrics to each song. We've also matched each mood swing type to a set of hardcoded words (ex: 'sad' might include words like tears, rain, cry, etc.) plus words that the user inputs. So, once a mood swing type is detected we run it using a gensim model to embed the words from the user and the hardcoded emotion words, and compare them with cosine similarities against all songs in our database.

Then, we recommend the song that best matches the user's brain activity (emotion) and their text input.

They can also select Shuffle to get more songs.

On the right side, they can also view a visualization of the electrical activity in their brain.

Challenges we ran into

  • Brainstorming and ideating. We spent a large amount of time brainstorming topics and then the logistics of each before settling on MyMelody
  • Implementing the UI was by far the most challenging, and we had to change some of the UI/UX design choices, as well as functionality due to limited time and resources

Accomplishments that we're proud of

  • A design and branding that's not only easy for the user to navigate but also suits our theme and problem space
  • A fully functional product!

What we learned

  • How to translate from the UI and design to code
  • How to communicate between HTML files and Python files, and set session variables
  • Using word embeddings

What's next for MyMelody

  • With more time and resources, a mobile app design and implementation
  • Be able to track song suggestion history through playlists and visualizations
  • Support international music (Kpop!)

Built With

Share this project:

Updates