Inspiration

As engineering students, we often struggle with stress and sleep. We thought about a music app that will generate songs to help you sleep. Then, we expanded this idea so that it not only applies to people with sleep problems, but everyone who enjoys music, and would like music that is specific to their exact mood.

What it does

This app has a one-time onboarding process for each user where it takes their preferred genre. Then, the user will be prompted to input their mood on a 2-dimensional axis (energy and pleasantness), as well as preferred duration of the song. The program will generate a .wav file that is custom-made for the user's mood and preferences. The app will also visualize the sound waves in a rotating circle that varies with the volume of the sound.

How we built it

On the front-end, react native, expo, typescript were used. On the backend, we built a database using sqlalchemy in python and implemented the MVC framework. We used flask for the url routes, and implemented a wrapper for creating the music. We used the OpenAI API to prompt ChatGPT to give us notes in MIDI format, then used a python library called midiutil to convert this format into a midi file, then to a .wav file. We also used pinata to store .wav files.

Challenges we ran into

One challenge was turning the .mid file to a .wav file, which took longer than expected and required extra dependencies that we had to deal with.

Accomplishments that we're proud of

We are proud of our UI. We think it looks very nice, and the visualization for the volume looks really cool.

What we learned

We learned how to use Pinata, and a few other things. We were surprised by how well AI was able to generate music in our research. Some people from our team had only coded in CS classes, where we only implement parts of projects, so this is the first time some of us created a project from the ground up.

What's next for Nocturne

Next for Nocturne, we wanted to create more complex songs with multiple tracks and instruments. We also wanted to make advanced playlists, the ability to share music, and create a recommendation system for songs.

Share this project:

Updates