Inspiration

Since this was out first hackathon, we weren’t exactly sure what to expect in terms of the goals set for us by judges. Since UGA-Hacks themed this year’s meet to “Rockstar”, we decided to think ahead and look into creating a music-oriented python project. At first we wanted to implement one manner of Artificial Intelligence into the project, but quickly turned away for multiple reasons. What we end up with is a mini-MIDI-composer that creates procedurally generated 8-bit scenes of sound.

What it does

Using the StreamLit web engine we created a web app that uses our back end procedural generator to generate and play a file based on user inputs. The user is able to choose between various different tempos, moods, zaniness amounts, jazziness amounts, chord instruments, lead instruments, and baser instruments. Then when prompted, we will generate and play the sound file that can be pulled and utilized by the user.

How we built it

We divided the project into three sections - data, front, and back. The back end was dictated to generation of midi files, where most of the computation happens. The data section stores and manipulates out data to communicate between the back and front, and the front allows for user interaction. Each member completed a different section, and once completed we worked together to integrate the final program. 

Challenges we ran into

We were quickly able to arrange and export a MIDI file in python. The rest of the time was spent painstakingly getting python to play multiple MIDI tracks simultaneously with minimal latency. Another adversity we ran into was the music theory elements at hand. Instead of just choosing major or minor, we wanted the user to have a larger amount of choice in the emotional weight of their results, so we turned to implementing the 7 Greek modes, of which major and minor are modes 1 and 6 respectively.

Accomplishments that we're proud of

All accompanied parts play very well in time with each other and some of the chord movement choices made by the program can be surprisingly stimulating to listen to. Our team also wasn’t extremely familiar with the python front end, so we found it satisfying to conquer such a challenge.

What we learned

We learned that writing midi from code is a difficult task - and doing that on top of calculations based on probable good sounding notes was harder. Learning to integrate the packages to manipulate files and create a web interface proved challenging but very rewarding. Creating a program you are passionate about is a lot easier then to stick with and work on - and this project has been a great example of that. 

What's next for Brahms

We tried to add as many instrument layers as we could before we were satisfied with the result to turn in. Unfortunately, drums were just shy of making the cut, and we would’ve loved for the user to have the option to choose from multiple drum beats.

Built With

  • mido
  • midoutil
  • python
  • random
  • streamlit
Share this project:

Updates

Submission history